mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +00:00
Fix sample index deployment action (#862)
* Update sample index dependencies * Update to tuneup 0.3.8, update dependencies * Upgrade to null safety, lock sass version * fix analyzer warnings * Fix unit tests * Fix issues from upgrading to null safety
This commit is contained in:
@@ -28,7 +28,7 @@ packages:
|
|||||||
name: analyzer
|
name: analyzer
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.7.1"
|
version: "1.7.2"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -42,7 +42,7 @@ packages:
|
|||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.6.1"
|
version: "2.7.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -63,7 +63,7 @@ packages:
|
|||||||
name: charcode
|
name: charcode
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.3.1"
|
||||||
cli_util:
|
cli_util:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -149,6 +149,13 @@ packages:
|
|||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
|
frontend_server_client:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: frontend_server_client
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.0"
|
||||||
glob:
|
glob:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -211,7 +218,7 @@ packages:
|
|||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.7.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -370,21 +377,21 @@ packages:
|
|||||||
name: test
|
name: test
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.16.8"
|
version: "1.17.9"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.4.1"
|
||||||
test_core:
|
test_core:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_core
|
name: test_core
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.19"
|
version: "0.3.29"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ packages:
|
|||||||
name: args
|
name: args
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.2.0"
|
||||||
charcode:
|
charcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: charcode
|
name: charcode
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.3.1"
|
||||||
lints:
|
lints:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
@@ -35,7 +35,7 @@ packages:
|
|||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.0"
|
version: "1.7.0"
|
||||||
path:
|
path:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import 'package:html/parser.dart' show parse;
|
|||||||
import 'package:path/path.dart' as path;
|
import 'package:path/path.dart' as path;
|
||||||
|
|
||||||
class CookbookScraper {
|
class CookbookScraper {
|
||||||
WebDriver _driver;
|
late WebDriver _driver;
|
||||||
|
|
||||||
Future init() async {
|
Future init() async {
|
||||||
_driver = await createDriver(desired: <String, dynamic>{});
|
_driver = await createDriver(desired: <String, dynamic>{});
|
||||||
@@ -36,7 +36,12 @@ class CookbookScraper {
|
|||||||
await _driver.get(Uri.parse(url));
|
await _driver.get(Uri.parse(url));
|
||||||
var pageContent = await _driver.pageSource;
|
var pageContent = await _driver.pageSource;
|
||||||
var page = parse(pageContent);
|
var page = parse(pageContent);
|
||||||
var name = page.querySelector('main>.container>header>h1').text;
|
var search = 'main>.container>header>h1';
|
||||||
|
var h1 = page.querySelector(search);
|
||||||
|
if (h1 == null) {
|
||||||
|
throw ('Could not find match for $search on page $url');
|
||||||
|
}
|
||||||
|
var name = h1.text;
|
||||||
var description = page.querySelectorAll('main>.container>p').first.text;
|
var description = page.querySelectorAll('main>.container>p').first.text;
|
||||||
|
|
||||||
var urlSegments = Uri.parse(url).pathSegments;
|
var urlSegments = Uri.parse(url).pathSegments;
|
||||||
@@ -50,6 +55,7 @@ class CookbookScraper {
|
|||||||
screenshots: [Screenshot(screenshotPath(url), 'Cookbook article')],
|
screenshots: [Screenshot(screenshotPath(url), 'Cookbook article')],
|
||||||
tags: ['cookbook', category],
|
tags: ['cookbook', category],
|
||||||
source: url,
|
source: url,
|
||||||
|
difficulty: 'advanced',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,10 @@ Future<List<Sample>> getSamples() async {
|
|||||||
var cookbookFile = File('lib/src/cookbook.json');
|
var cookbookFile = File('lib/src/cookbook.json');
|
||||||
var contents = await yamlFile.readAsString();
|
var contents = await yamlFile.readAsString();
|
||||||
var cookbookContents = await cookbookFile.readAsString();
|
var cookbookContents = await cookbookFile.readAsString();
|
||||||
var index = checkedYamlDecode(contents, (m) => Index.fromJson(m),
|
var index = checkedYamlDecode(
|
||||||
|
contents, (m) => m != null ? Index.fromJson(m) : null,
|
||||||
sourceUrl: yamlFile.uri);
|
sourceUrl: yamlFile.uri);
|
||||||
|
if (index == null) throw('unable to get load from ${yamlFile.uri}');
|
||||||
var cookbookIndex =
|
var cookbookIndex =
|
||||||
Index.fromJson(json.decode(cookbookContents) as Map<dynamic, dynamic>);
|
Index.fromJson(json.decode(cookbookContents) as Map<dynamic, dynamic>);
|
||||||
return index.samples..addAll(cookbookIndex.samples);
|
return index.samples..addAll(cookbookIndex.samples);
|
||||||
|
|||||||
@@ -7,14 +7,15 @@ import 'dart:html';
|
|||||||
class Carousel {
|
class Carousel {
|
||||||
final bool withArrowKeyControl;
|
final bool withArrowKeyControl;
|
||||||
|
|
||||||
final Element container = querySelector('.slider-container');
|
final Element container = querySelector('.slider-container')!;
|
||||||
final List<Element> slides = querySelectorAll('.slider-single');
|
final List<Element> slides = querySelectorAll('.slider-single');
|
||||||
|
|
||||||
int currentSlideIndex, lastSlideIndex;
|
late int currentSlideIndex;
|
||||||
|
late int lastSlideIndex;
|
||||||
|
|
||||||
Element prevSlide, currentSlide, nextSlide;
|
late Element prevSlide, currentSlide, nextSlide;
|
||||||
|
|
||||||
num x0;
|
late num x0;
|
||||||
bool touched = false;
|
bool touched = false;
|
||||||
|
|
||||||
Carousel.init({this.withArrowKeyControl = false}) {
|
Carousel.init({this.withArrowKeyControl = false}) {
|
||||||
@@ -90,13 +91,13 @@ class Carousel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _touchStartListener(TouchEvent e) {
|
void _touchStartListener(TouchEvent e) {
|
||||||
x0 = e.changedTouches.first.client.x;
|
x0 = e.changedTouches!.first.client.x;
|
||||||
touched = true;
|
touched = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _touchEndListener(TouchEvent e) {
|
void _touchEndListener(TouchEvent e) {
|
||||||
if (touched) {
|
if (touched) {
|
||||||
int dx = (e.changedTouches.first.client.x - x0) as int;
|
int dx = (e.changedTouches!.first.client.x - x0) as int;
|
||||||
|
|
||||||
// dx==0 case is ignored
|
// dx==0 case is ignored
|
||||||
if (dx > 0 && currentSlideIndex > 0) {
|
if (dx > 0 && currentSlideIndex > 0) {
|
||||||
@@ -115,7 +116,7 @@ class Carousel {
|
|||||||
|
|
||||||
void _updateBullets() {
|
void _updateBullets() {
|
||||||
final bullets =
|
final bullets =
|
||||||
querySelector('.bullet-container').querySelectorAll('.bullet');
|
querySelector('.bullet-container')!.querySelectorAll('.bullet');
|
||||||
for (var i = 0; i < bullets.length; i++) {
|
for (var i = 0; i < bullets.length; i++) {
|
||||||
bullets[i].classes.remove('active');
|
bullets[i].classes.remove('active');
|
||||||
if (i == currentSlideIndex) {
|
if (i == currentSlideIndex) {
|
||||||
@@ -132,18 +133,18 @@ class Carousel {
|
|||||||
if (currentSlideIndex == slides.length - 1) {
|
if (currentSlideIndex == slides.length - 1) {
|
||||||
slides[0].classes.add('hidden');
|
slides[0].classes.add('hidden');
|
||||||
slides[slides.length - 1].classes.remove('hidden');
|
slides[slides.length - 1].classes.remove('hidden');
|
||||||
prevArrow.classes.remove('hidden');
|
prevArrow!.classes.remove('hidden');
|
||||||
nextArrow.classes.add('hidden');
|
nextArrow!.classes.add('hidden');
|
||||||
} else if (currentSlideIndex == 0) {
|
} else if (currentSlideIndex == 0) {
|
||||||
slides[slides.length - 1].classes.add('hidden');
|
slides[slides.length - 1].classes.add('hidden');
|
||||||
slides[0].classes.remove('hidden');
|
slides[0].classes.remove('hidden');
|
||||||
prevArrow.classes.add('hidden');
|
prevArrow!.classes.add('hidden');
|
||||||
nextArrow.classes.remove('hidden');
|
nextArrow!.classes.remove('hidden');
|
||||||
} else {
|
} else {
|
||||||
slides[slides.length - 1].classes.remove('hidden');
|
slides[slides.length - 1].classes.remove('hidden');
|
||||||
slides[0].classes.remove('hidden');
|
slides[0].classes.remove('hidden');
|
||||||
prevArrow.classes.remove('hidden');
|
prevArrow!.classes.remove('hidden');
|
||||||
nextArrow.classes.remove('hidden');
|
nextArrow!.classes.remove('hidden');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class Sample {
|
|||||||
final String name;
|
final String name;
|
||||||
|
|
||||||
/// The author of the sample. Typically "Flutter"
|
/// The author of the sample. Typically "Flutter"
|
||||||
final String author;
|
final String? author;
|
||||||
|
|
||||||
/// Screenshots of the sample or cookbook article. At least 1 screenshot is
|
/// Screenshots of the sample or cookbook article. At least 1 screenshot is
|
||||||
/// required.
|
/// required.
|
||||||
@@ -44,14 +44,14 @@ class Sample {
|
|||||||
final String source;
|
final String source;
|
||||||
|
|
||||||
/// A link to this sample running in the browser.
|
/// A link to this sample running in the browser.
|
||||||
final String web;
|
final String? web;
|
||||||
|
|
||||||
/// 3-5 sentences describing the sample.
|
/// 3-5 sentences describing the sample.
|
||||||
final String description;
|
final String description;
|
||||||
|
|
||||||
/// The difficulty level. Values are either 'beginner', 'intermediate', or
|
/// The difficulty level. Values are either 'beginner', 'intermediate', or
|
||||||
/// 'advanced'.
|
/// 'advanced'.
|
||||||
final String difficulty;
|
final String? difficulty;
|
||||||
|
|
||||||
/// List of widgets or Flutter APIs used by the sample. e.g. "AnimatedBuilder"
|
/// List of widgets or Flutter APIs used by the sample. e.g. "AnimatedBuilder"
|
||||||
/// or "ChangeNotifier".
|
/// or "ChangeNotifier".
|
||||||
@@ -76,26 +76,26 @@ class Sample {
|
|||||||
final String type;
|
final String type;
|
||||||
|
|
||||||
/// The date this sample was created.
|
/// The date this sample was created.
|
||||||
final DateTime date;
|
final DateTime? date;
|
||||||
|
|
||||||
/// The Flutter channel this sample runs on. Either 'stable', 'dev' or
|
/// The Flutter channel this sample runs on. Either 'stable', 'dev' or
|
||||||
/// 'master'.
|
/// 'master'.
|
||||||
final String channel;
|
final String? channel;
|
||||||
|
|
||||||
Sample({
|
Sample({
|
||||||
this.name,
|
required this.name,
|
||||||
this.author,
|
this.author = 'Flutter',
|
||||||
this.screenshots,
|
required this.screenshots,
|
||||||
this.source,
|
required this.source,
|
||||||
this.web,
|
this.web,
|
||||||
this.description,
|
required this.description,
|
||||||
this.difficulty,
|
this.difficulty = 'beginner',
|
||||||
this.widgets = const [],
|
this.widgets = const [],
|
||||||
this.packages = const [],
|
this.packages = const [],
|
||||||
this.tags = const [],
|
this.tags = const [],
|
||||||
this.platforms = const [],
|
this.platforms = const [],
|
||||||
this.links = const [],
|
this.links = const [],
|
||||||
this.type,
|
required this.type,
|
||||||
this.date,
|
this.date,
|
||||||
this.channel,
|
this.channel,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ Index _$IndexFromJson(Map json) {
|
|||||||
$checkedConvert(
|
$checkedConvert(
|
||||||
json,
|
json,
|
||||||
'samples',
|
'samples',
|
||||||
(v) => (v as List)
|
(v) => (v as List<dynamic>)
|
||||||
?.map((e) => e == null ? null : Sample.fromJson(e as Map))
|
.map((e) => Sample.fromJson(e as Map))
|
||||||
?.toList()),
|
.toList()),
|
||||||
);
|
);
|
||||||
return val;
|
return val;
|
||||||
});
|
});
|
||||||
@@ -28,35 +28,35 @@ Sample _$SampleFromJson(Map json) {
|
|||||||
return $checkedNew('Sample', json, () {
|
return $checkedNew('Sample', json, () {
|
||||||
final val = Sample(
|
final val = Sample(
|
||||||
name: $checkedConvert(json, 'name', (v) => v as String),
|
name: $checkedConvert(json, 'name', (v) => v as String),
|
||||||
author: $checkedConvert(json, 'author', (v) => v as String),
|
author: $checkedConvert(json, 'author', (v) => v as String?),
|
||||||
screenshots: $checkedConvert(
|
screenshots: $checkedConvert(
|
||||||
json,
|
json,
|
||||||
'screenshots',
|
'screenshots',
|
||||||
(v) => (v as List)
|
(v) => (v as List<dynamic>)
|
||||||
?.map((e) => e == null ? null : Screenshot.fromJson(e as Map))
|
.map((e) => Screenshot.fromJson(e as Map))
|
||||||
?.toList()),
|
.toList()),
|
||||||
source: $checkedConvert(json, 'source', (v) => v as String),
|
source: $checkedConvert(json, 'source', (v) => v as String),
|
||||||
web: $checkedConvert(json, 'web', (v) => v as String),
|
web: $checkedConvert(json, 'web', (v) => v as String?),
|
||||||
description: $checkedConvert(json, 'description', (v) => v as String),
|
description: $checkedConvert(json, 'description', (v) => v as String),
|
||||||
difficulty: $checkedConvert(json, 'difficulty', (v) => v as String),
|
difficulty: $checkedConvert(json, 'difficulty', (v) => v as String?),
|
||||||
widgets: $checkedConvert(json, 'widgets',
|
widgets: $checkedConvert(json, 'widgets',
|
||||||
(v) => (v as List)?.map((e) => e as String)?.toList()),
|
(v) => (v as List<dynamic>).map((e) => e as String).toList()),
|
||||||
packages: $checkedConvert(json, 'packages',
|
packages: $checkedConvert(json, 'packages',
|
||||||
(v) => (v as List)?.map((e) => e as String)?.toList()),
|
(v) => (v as List<dynamic>).map((e) => e as String).toList()),
|
||||||
tags: $checkedConvert(
|
tags: $checkedConvert(json, 'tags',
|
||||||
json, 'tags', (v) => (v as List)?.map((e) => e as String)?.toList()),
|
(v) => (v as List<dynamic>).map((e) => e as String).toList()),
|
||||||
platforms: $checkedConvert(json, 'platforms',
|
platforms: $checkedConvert(json, 'platforms',
|
||||||
(v) => (v as List)?.map((e) => e as String)?.toList()),
|
(v) => (v as List<dynamic>).map((e) => e as String).toList()),
|
||||||
links: $checkedConvert(
|
links: $checkedConvert(
|
||||||
json,
|
json,
|
||||||
'links',
|
'links',
|
||||||
(v) => (v as List)
|
(v) => (v as List<dynamic>)
|
||||||
?.map((e) => e == null ? null : Link.fromJson(e as Map))
|
.map((e) => Link.fromJson(e as Map))
|
||||||
?.toList()),
|
.toList()),
|
||||||
type: $checkedConvert(json, 'type', (v) => v as String),
|
type: $checkedConvert(json, 'type', (v) => v as String),
|
||||||
date: $checkedConvert(
|
date: $checkedConvert(
|
||||||
json, 'date', (v) => v == null ? null : DateTime.parse(v as String)),
|
json, 'date', (v) => v == null ? null : DateTime.parse(v as String)),
|
||||||
channel: $checkedConvert(json, 'channel', (v) => v as String),
|
channel: $checkedConvert(json, 'channel', (v) => v as String?),
|
||||||
);
|
);
|
||||||
return val;
|
return val;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ samples:
|
|||||||
- scoped_model
|
- scoped_model
|
||||||
tags: ['intermediate', 'sample', 'gallery', 'material', 'design', 'vignettes']
|
tags: ['intermediate', 'sample', 'gallery', 'material', 'design', 'vignettes']
|
||||||
platforms: ['web', 'ios', 'android']
|
platforms: ['web', 'ios', 'android']
|
||||||
|
links: []
|
||||||
type: demo
|
type: demo
|
||||||
|
|
||||||
- name: Add to App
|
- name: Add to App
|
||||||
@@ -105,6 +106,7 @@ samples:
|
|||||||
- provider
|
- provider
|
||||||
tags: ['advanced', 'sample', 'add-to-app', 'android', 'ios', 'native', 'embedding']
|
tags: ['advanced', 'sample', 'add-to-app', 'android', 'ios', 'native', 'embedding']
|
||||||
platforms: ['ios', 'android']
|
platforms: ['ios', 'android']
|
||||||
|
links: []
|
||||||
type: sample
|
type: sample
|
||||||
|
|
||||||
- name: Animations
|
- name: Animations
|
||||||
@@ -133,6 +135,7 @@ samples:
|
|||||||
- flutter/material
|
- flutter/material
|
||||||
tags: ['intermediate', 'sample', 'animation']
|
tags: ['intermediate', 'sample', 'animation']
|
||||||
platforms: ['ios', 'android', 'web']
|
platforms: ['ios', 'android', 'web']
|
||||||
|
links: []
|
||||||
type: sample
|
type: sample
|
||||||
web: web/animations
|
web: web/animations
|
||||||
|
|
||||||
@@ -157,6 +160,7 @@ samples:
|
|||||||
- google_maps_webservice
|
- google_maps_webservice
|
||||||
tags: ['intermediate', 'sample', 'firebase', 'maps']
|
tags: ['intermediate', 'sample', 'firebase', 'maps']
|
||||||
platforms: ['ios', 'android']
|
platforms: ['ios', 'android']
|
||||||
|
links: []
|
||||||
type: sample
|
type: sample
|
||||||
|
|
||||||
- name: Isolate Example
|
- name: Isolate Example
|
||||||
@@ -181,6 +185,7 @@ samples:
|
|||||||
- dart:math
|
- dart:math
|
||||||
tags: ['intermediate', 'sample', 'isolates', 'concurrency']
|
tags: ['intermediate', 'sample', 'isolates', 'concurrency']
|
||||||
platforms: ['ios', 'android']
|
platforms: ['ios', 'android']
|
||||||
|
links: []
|
||||||
type: sample
|
type: sample
|
||||||
|
|
||||||
- name: jsonexample
|
- name: jsonexample
|
||||||
@@ -209,6 +214,7 @@ samples:
|
|||||||
- built_value_generator
|
- built_value_generator
|
||||||
tags: ['beginner', 'sample']
|
tags: ['beginner', 'sample']
|
||||||
platforms: ['ios', 'android']
|
platforms: ['ios', 'android']
|
||||||
|
links: []
|
||||||
type: sample
|
type: sample
|
||||||
|
|
||||||
- name: Place Tracker
|
- name: Place Tracker
|
||||||
@@ -235,6 +241,7 @@ samples:
|
|||||||
- google_maps_flutter
|
- google_maps_flutter
|
||||||
tags: ['intermediate', 'sample', 'json', 'serialization']
|
tags: ['intermediate', 'sample', 'json', 'serialization']
|
||||||
platforms: ['android']
|
platforms: ['android']
|
||||||
|
links: []
|
||||||
type: sample
|
type: sample
|
||||||
|
|
||||||
- name: Platform Design
|
- name: Platform Design
|
||||||
@@ -266,6 +273,7 @@ samples:
|
|||||||
- flutter/cupertino
|
- flutter/cupertino
|
||||||
tags: ['advanced', 'sample', 'ios']
|
tags: ['advanced', 'sample', 'ios']
|
||||||
platforms: ['ios', 'android']
|
platforms: ['ios', 'android']
|
||||||
|
links: []
|
||||||
type: sample
|
type: sample
|
||||||
|
|
||||||
- name: Platform View Swift
|
- name: Platform View Swift
|
||||||
@@ -287,6 +295,7 @@ samples:
|
|||||||
- flutter/services
|
- flutter/services
|
||||||
tags: ['advanced', 'sample', 'ios']
|
tags: ['advanced', 'sample', 'ios']
|
||||||
platforms: ['ios']
|
platforms: ['ios']
|
||||||
|
links: []
|
||||||
type: sample
|
type: sample
|
||||||
|
|
||||||
- name: Infinite List
|
- name: Infinite List
|
||||||
@@ -311,6 +320,7 @@ samples:
|
|||||||
- meta
|
- meta
|
||||||
tags: ['sample', 'material', 'design', 'android', 'ios']
|
tags: ['sample', 'material', 'design', 'android', 'ios']
|
||||||
platforms: ['ios', 'android']
|
platforms: ['ios', 'android']
|
||||||
|
links: []
|
||||||
type: sample
|
type: sample
|
||||||
|
|
||||||
- name: IOS App Clip
|
- name: IOS App Clip
|
||||||
@@ -331,6 +341,7 @@ samples:
|
|||||||
- device_info
|
- device_info
|
||||||
tags: ['sample', 'Device Info', 'ios']
|
tags: ['sample', 'Device Info', 'ios']
|
||||||
platforms: ['ios']
|
platforms: ['ios']
|
||||||
|
links: []
|
||||||
type: sample
|
type: sample
|
||||||
|
|
||||||
- name: Testing App
|
- name: Testing App
|
||||||
@@ -353,6 +364,7 @@ samples:
|
|||||||
- provider
|
- provider
|
||||||
tags: ['sample', 'material', 'android', 'ios']
|
tags: ['sample', 'material', 'android', 'ios']
|
||||||
platforms: ['ios', 'android']
|
platforms: ['ios', 'android']
|
||||||
|
links: []
|
||||||
type: sample
|
type: sample
|
||||||
|
|
||||||
- name: Provider Shopper
|
- name: Provider Shopper
|
||||||
@@ -376,6 +388,7 @@ samples:
|
|||||||
- provider
|
- provider
|
||||||
tags: ['intermediate', 'sample', 'provider']
|
tags: ['intermediate', 'sample', 'provider']
|
||||||
platforms: ['ios', 'android', 'web']
|
platforms: ['ios', 'android', 'web']
|
||||||
|
links: []
|
||||||
type: sample
|
type: sample
|
||||||
web: web/provider_shopper
|
web: web/provider_shopper
|
||||||
|
|
||||||
@@ -402,6 +415,7 @@ samples:
|
|||||||
- firebase
|
- firebase
|
||||||
tags: ['intermediate', 'sample', 'firebase']
|
tags: ['intermediate', 'sample', 'firebase']
|
||||||
platforms: ['ios', 'android', 'web']
|
platforms: ['ios', 'android', 'web']
|
||||||
|
links: []
|
||||||
type: sample
|
type: sample
|
||||||
web: web/web_dashboard
|
web: web/web_dashboard
|
||||||
|
|
||||||
@@ -423,6 +437,7 @@ samples:
|
|||||||
packages: []
|
packages: []
|
||||||
tags: ['intermediate', 'sample', 'forms']
|
tags: ['intermediate', 'sample', 'forms']
|
||||||
platforms: ['ios', 'android', 'web']
|
platforms: ['ios', 'android', 'web']
|
||||||
|
links: []
|
||||||
type: sample
|
type: sample
|
||||||
web: web/form_app
|
web: web/form_app
|
||||||
###################
|
###################
|
||||||
@@ -433,6 +448,7 @@ samples:
|
|||||||
author: Flutter
|
author: Flutter
|
||||||
screenshots:
|
screenshots:
|
||||||
- url: images/charts1.png
|
- url: images/charts1.png
|
||||||
|
alt: Charts screenshot
|
||||||
source: https://github.com/google/charts
|
source: https://github.com/google/charts
|
||||||
description: >
|
description: >
|
||||||
A general-purpose charting library.
|
A general-purpose charting library.
|
||||||
@@ -440,6 +456,7 @@ samples:
|
|||||||
widgets: []
|
widgets: []
|
||||||
packages: []
|
packages: []
|
||||||
platforms: ['ios', 'android', 'web']
|
platforms: ['ios', 'android', 'web']
|
||||||
|
links: []
|
||||||
tags: ['demo', 'charts']
|
tags: ['demo', 'charts']
|
||||||
web: web/charts
|
web: web/charts
|
||||||
type: demo
|
type: demo
|
||||||
@@ -456,6 +473,7 @@ samples:
|
|||||||
widgets: []
|
widgets: []
|
||||||
packages: []
|
packages: []
|
||||||
platforms: ['web']
|
platforms: ['web']
|
||||||
|
links: []
|
||||||
tags: ['demo', 'flutter create']
|
tags: ['demo', 'flutter create']
|
||||||
web: web/filipino_cuisine
|
web: web/filipino_cuisine
|
||||||
type: demo
|
type: demo
|
||||||
@@ -472,6 +490,7 @@ samples:
|
|||||||
widgets: []
|
widgets: []
|
||||||
packages: []
|
packages: []
|
||||||
platforms: ['web']
|
platforms: ['web']
|
||||||
|
links: []
|
||||||
tags: ['demo', 'data', 'visualization']
|
tags: ['demo', 'data', 'visualization']
|
||||||
web: web/github_dataviz
|
web: web/github_dataviz
|
||||||
type: demo
|
type: demo
|
||||||
@@ -488,6 +507,7 @@ samples:
|
|||||||
widgets: []
|
widgets: []
|
||||||
packages: []
|
packages: []
|
||||||
platforms: ['web']
|
platforms: ['web']
|
||||||
|
links: []
|
||||||
tags: ['demo', 'animation']
|
tags: ['demo', 'animation']
|
||||||
web: web/particle_background
|
web: web/particle_background
|
||||||
type: demo
|
type: demo
|
||||||
@@ -504,6 +524,7 @@ samples:
|
|||||||
widgets: []
|
widgets: []
|
||||||
packages: []
|
packages: []
|
||||||
platforms: ['web']
|
platforms: ['web']
|
||||||
|
links: []
|
||||||
tags: ['demo', 'game']
|
tags: ['demo', 'game']
|
||||||
web: web/slide_puzzle
|
web: web/slide_puzzle
|
||||||
type: demo
|
type: demo
|
||||||
@@ -520,6 +541,7 @@ samples:
|
|||||||
widgets: []
|
widgets: []
|
||||||
packages: []
|
packages: []
|
||||||
platforms: ['web']
|
platforms: ['web']
|
||||||
|
links: []
|
||||||
tags: ['demo', 'animation']
|
tags: ['demo', 'animation']
|
||||||
web: https://z.flutter.gallery/#/dice
|
web: https://z.flutter.gallery/#/dice
|
||||||
type: demo
|
type: demo
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// found in the LICENSE file
|
// found in the LICENSE file
|
||||||
|
|
||||||
bool matchesQuery(String query, String sampleAttributes) {
|
bool matchesQuery(String query, String sampleAttributes) {
|
||||||
if (query == null || query.isEmpty) {
|
if (query.isEmpty) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
var queryWords = query.split(' ')..removeWhere((s) => s.isEmpty);
|
var queryWords = query.split(' ')..removeWhere((s) => s.isEmpty);
|
||||||
@@ -68,11 +68,13 @@ String searchQueryFromParams(Map<String, String> params) {
|
|||||||
}
|
}
|
||||||
if (params.containsKey('type')) {
|
if (params.containsKey('type')) {
|
||||||
if (buf.isNotEmpty) buf.write(' ');
|
if (buf.isNotEmpty) buf.write(' ');
|
||||||
buf.write('type:' + params['type']);
|
var value = params['type'];
|
||||||
|
if (value != null) buf.write('type:' + value);
|
||||||
}
|
}
|
||||||
if (params.containsKey('platform')) {
|
if (params.containsKey('platform')) {
|
||||||
if (buf.isNotEmpty) buf.write(' ');
|
if (buf.isNotEmpty) buf.write(' ');
|
||||||
buf.write('platform:' + params['platform']);
|
var value = params['platform'];
|
||||||
|
if (value != null) buf.write('platform:' + value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ String _descriptionPage(Sample sample) => '''
|
|||||||
|
|
||||||
String _descriptionButtons(Sample sample) {
|
String _descriptionButtons(Sample sample) {
|
||||||
var buf = StringBuffer();
|
var buf = StringBuffer();
|
||||||
if (sample?.web?.isNotEmpty == true) {
|
if (sample.web?.isNotEmpty == true) {
|
||||||
buf.write(
|
buf.write(
|
||||||
'''<button class="mdc-button mdc-button--outlined" onclick="window.location.href = '${sample.web}';"><span class="mdc-button__ripple"></span> Launch App</button>''');
|
'''<button class="mdc-button mdc-button--outlined" onclick="window.location.href = '${sample.web}';"><span class="mdc-button__ripple"></span> Launch App</button>''');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ String pascalCase(String input) {
|
|||||||
|
|
||||||
String _fixCase(String input, String separator) =>
|
String _fixCase(String input, String separator) =>
|
||||||
input.replaceAllMapped(_upperCase, (match) {
|
input.replaceAllMapped(_upperCase, (match) {
|
||||||
var lower = match.group(0).toLowerCase();
|
var group = match.group(0);
|
||||||
|
if (group == null) return input;
|
||||||
|
var lower = group.toLowerCase();
|
||||||
|
|
||||||
if (match.start > 0) {
|
if (match.start > 0) {
|
||||||
lower = '$separator$lower';
|
lower = '$separator$lower';
|
||||||
|
|||||||
@@ -4,23 +4,29 @@ homepage: https://github.com/flutter/samples_index
|
|||||||
author: Flutter Team <flutter-dev@googlegroups.com>
|
author: Flutter Team <flutter-dev@googlegroups.com>
|
||||||
version: 0.0.1
|
version: 0.0.1
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.5.0 <3.0.0"
|
sdk: ">=2.12.0 <3.0.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
json_annotation: ^3.0.0
|
json_annotation: ^4.0.1
|
||||||
path: ^1.6.0
|
path: ^1.6.0
|
||||||
yaml: ^2.2.0
|
yaml: ^3.0.0
|
||||||
mdc_web: ^0.5.0-pre
|
mdc_web: ^0.6.0
|
||||||
sass_builder: ^2.1.0
|
sass_builder: ^2.1.0
|
||||||
checked_yaml: ^1.0.0
|
checked_yaml: ^2.0.1
|
||||||
webdriver: ^2.1.0
|
webdriver: ^3.0.0
|
||||||
html: ^0.14.0
|
html: ^0.15.0
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
grinder: ^0.8.3
|
grinder: ^0.9.0
|
||||||
flutter_lints: ^1.0.0
|
flutter_lints: ^1.0.0
|
||||||
test: ^1.6.0
|
test: ^1.17.10
|
||||||
json_serializable: ^3.2.0
|
json_serializable: ^4.0.2
|
||||||
build: ^1.2.0
|
build: ^2.0.3
|
||||||
build_runner: ^1.7.0
|
build_runner: ^2.0.6
|
||||||
build_web_compilers: ^2.7.0
|
build_web_compilers: ^3.0.0
|
||||||
tuneup: ^0.3.6
|
tuneup: ^0.3.8
|
||||||
image: ^2.1.0
|
image: ^3.0.2
|
||||||
|
# waiting for the next material-components-web release.
|
||||||
|
# Once released, it will need to be rolled into package:mdc_web.
|
||||||
|
#
|
||||||
|
# https://github.com/material-components/material-components-web/pull/7158
|
||||||
|
dependency_overrides:
|
||||||
|
sass: 1.32.10
|
||||||
@@ -16,15 +16,18 @@ void main() {
|
|||||||
var contents = await file.readAsString();
|
var contents = await file.readAsString();
|
||||||
expect(contents, isNotEmpty);
|
expect(contents, isNotEmpty);
|
||||||
|
|
||||||
var index = checkedYamlDecode(contents, (m) => Index.fromJson(m),
|
var index = checkedYamlDecode(contents, (m) => m != null ? Index.fromJson(m) : null,
|
||||||
sourceUrl: file.uri);
|
sourceUrl: file.uri);
|
||||||
|
if (index == null) {
|
||||||
|
throw('unable to load YAML from $file');
|
||||||
|
}
|
||||||
expect(index.samples, isNotEmpty);
|
expect(index.samples, isNotEmpty);
|
||||||
|
|
||||||
var sample = index.samples.first;
|
var sample = index.samples.first;
|
||||||
expect(sample, isNotNull);
|
expect(sample, isNotNull);
|
||||||
expect(sample.name, 'Kittens');
|
expect(sample.name, 'Kittens');
|
||||||
expect(sample.screenshots, hasLength(2));
|
expect(sample.screenshots, hasLength(2));
|
||||||
expect(sample.source, 'http://github.com/johnpryan/kittens');
|
expect(sample.source, 'https://github.com/johnpryan/kittens');
|
||||||
expect(sample.description, 'A sample kitten app');
|
expect(sample.description, 'A sample kitten app');
|
||||||
expect(sample.difficulty, 'beginner');
|
expect(sample.difficulty, 'beginner');
|
||||||
expect(sample.widgets, hasLength(2));
|
expect(sample.widgets, hasLength(2));
|
||||||
@@ -36,7 +39,7 @@ void main() {
|
|||||||
expect(sample.platforms, hasLength(3));
|
expect(sample.platforms, hasLength(3));
|
||||||
expect(sample.links, hasLength(2));
|
expect(sample.links, hasLength(2));
|
||||||
expect(sample.links[1].text, 'author');
|
expect(sample.links[1].text, 'author');
|
||||||
expect(sample.links[1].href, 'http://jpryan.me');
|
expect(sample.links[1].href, 'https://jpryan.me');
|
||||||
expect(sample.type, 'sample');
|
expect(sample.type, 'sample');
|
||||||
expect(sample.date, DateTime.parse('2019-12-15T02:59:43.1Z'));
|
expect(sample.date, DateTime.parse('2019-12-15T02:59:43.1Z'));
|
||||||
expect(sample.channel, 'stable');
|
expect(sample.channel, 'stable');
|
||||||
@@ -49,8 +52,11 @@ void main() {
|
|||||||
var contents = await file.readAsString();
|
var contents = await file.readAsString();
|
||||||
expect(contents, isNotEmpty);
|
expect(contents, isNotEmpty);
|
||||||
|
|
||||||
var index = checkedYamlDecode(contents, (m) => Index.fromJson(m),
|
var index = checkedYamlDecode(contents, (m) => m != null ? Index.fromJson(m) : null,
|
||||||
sourceUrl: file.uri);
|
sourceUrl: file.uri);
|
||||||
|
if (index == null) {
|
||||||
|
throw('unable to load YAML from $file');
|
||||||
|
}
|
||||||
var sample = index.samples.first;
|
var sample = index.samples.first;
|
||||||
expect(
|
expect(
|
||||||
sample.searchAttributes.split(' '),
|
sample.searchAttributes.split(' '),
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ samples:
|
|||||||
alt: a kitten
|
alt: a kitten
|
||||||
- url: https://placekitten.com/400/400
|
- url: https://placekitten.com/400/400
|
||||||
alt: another kitten
|
alt: another kitten
|
||||||
source: http://github.com/johnpryan/kittens
|
source: https://github.com/johnpryan/kittens
|
||||||
description: A sample kitten app
|
description: A sample kitten app
|
||||||
difficulty: beginner
|
difficulty: beginner
|
||||||
widgets:
|
widgets:
|
||||||
@@ -20,7 +20,7 @@ samples:
|
|||||||
- text: inspiration
|
- text: inspiration
|
||||||
href: https://apps.apple.com/us/app/neko-atsume-kitty-collector/id923917775
|
href: https://apps.apple.com/us/app/neko-atsume-kitty-collector/id923917775
|
||||||
- text: author
|
- text: author
|
||||||
href: http://jpryan.me
|
href: https://jpryan.me
|
||||||
type: sample # sample, app, or cookbook
|
type: sample # sample, app, or cookbook
|
||||||
date: 2019-12-15T02:59:43.1Z
|
date: 2019-12-15T02:59:43.1Z
|
||||||
channel: stable
|
channel: stable
|
||||||
|
|||||||
@@ -104,12 +104,11 @@ Future<void> _createThumbnails(Directory directory) async {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var file = entity as File;
|
var pathPrefix = path.dirname(entity.path);
|
||||||
var pathPrefix = path.dirname(file.path);
|
|
||||||
var thumbnailFile = File(path.join(pathPrefix, filename + '_thumb.png'));
|
var thumbnailFile = File(path.join(pathPrefix, filename + '_thumb.png'));
|
||||||
|
|
||||||
var img = image.decodeImage(await file.readAsBytes());
|
var img = image.decodeImage(await entity.readAsBytes());
|
||||||
var resized = image.copyResize(img, width: 640);
|
var resized = image.copyResize(img!, width: 640);
|
||||||
filesToWrite.add(thumbnailFile.writeAsBytes(image.encodePng(resized)));
|
filesToWrite.add(thumbnailFile.writeAsBytes(image.encodePng(resized)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ import 'dart:html';
|
|||||||
import 'package:mdc_web/mdc_web.dart';
|
import 'package:mdc_web/mdc_web.dart';
|
||||||
import 'package:samples_index/src/carousel.dart';
|
import 'package:samples_index/src/carousel.dart';
|
||||||
|
|
||||||
InputElement searchInput;
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
querySelectorAll('.mdc-card__primary-action').forEach((el) => MDCRipple(el));
|
querySelectorAll('.mdc-card__primary-action').forEach((el) => MDCRipple(el));
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import 'package:mdc_web/mdc_web.dart';
|
|||||||
import 'package:samples_index/browser.dart';
|
import 'package:samples_index/browser.dart';
|
||||||
|
|
||||||
/// The Material text input for searching
|
/// The Material text input for searching
|
||||||
MDCTextField searchBar;
|
late final MDCTextField searchBar;
|
||||||
MDCChipSet chipSet;
|
late final MDCChipSet chipSet;
|
||||||
|
|
||||||
/// The current set of query parameters that determine how the cards are
|
/// The current set of query parameters that determine how the cards are
|
||||||
/// filtered. e.g. {'search': 'kittens', 'platform': 'ios'}
|
/// filtered. e.g. {'search': 'kittens', 'platform': 'ios'}
|
||||||
@@ -16,9 +16,9 @@ const platformKey = 'platform';
|
|||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
// Initialize Material components
|
// Initialize Material components
|
||||||
MDCFloatingLabel(querySelector('.mdc-floating-label'));
|
MDCFloatingLabel(querySelector('.mdc-floating-label')!);
|
||||||
searchBar = MDCTextField(querySelector('#search-bar'));
|
searchBar = MDCTextField(querySelector('#search-bar')!);
|
||||||
MDCRipple(querySelector('#clear-button'));
|
MDCRipple(querySelector('#clear-button')!);
|
||||||
|
|
||||||
// Listen for hash changes
|
// Listen for hash changes
|
||||||
window.onHashChange.listen((_) {
|
window.onHashChange.listen((_) {
|
||||||
@@ -33,7 +33,7 @@ void main() {
|
|||||||
querySelectorAll('.mdc-card__primary-action').forEach((el) => MDCRipple(el)
|
querySelectorAll('.mdc-card__primary-action').forEach((el) => MDCRipple(el)
|
||||||
// Navigate to the description page when tapped
|
// Navigate to the description page when tapped
|
||||||
..listen('click', (e) {
|
..listen('click', (e) {
|
||||||
window.location.href = el.attributes['href'];
|
window.location.href = el.attributes['href']!;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Filter cards on each keypress
|
// Filter cards on each keypress
|
||||||
@@ -44,12 +44,12 @@ void main() {
|
|||||||
|
|
||||||
// Update the URL only when the user is done typing in the search bar
|
// Update the URL only when the user is done typing in the search bar
|
||||||
searchBar.listen('change', (e) {
|
searchBar.listen('change', (e) {
|
||||||
queryParams[searchKey] = searchBar.value;
|
queryParams[searchKey] = searchBar.value!;
|
||||||
updateHash();
|
updateHash();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update the hash, cards, and text input when the clear button is pressed
|
// Update the hash, cards, and text input when the clear button is pressed
|
||||||
querySelector('#clear-button').onClick.listen((e) {
|
querySelector('#clear-button')!.onClick.listen((e) {
|
||||||
queryParams.remove('search');
|
queryParams.remove('search');
|
||||||
updateHash();
|
updateHash();
|
||||||
setSearchBarText();
|
setSearchBarText();
|
||||||
@@ -57,10 +57,10 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Initialize chips
|
// Initialize chips
|
||||||
chipSet = MDCChipSet(querySelector('.mdc-chip-set'));
|
chipSet = MDCChipSet(querySelector('.mdc-chip-set')!);
|
||||||
chipSet.listen('MDCChip:selection', (e) {
|
chipSet.listen('MDCChip:selection', (e) {
|
||||||
// Get the query parameters for this chip
|
// Get the query parameters for this chip
|
||||||
var selectedChipIndex = chipSet.chips.indexWhere((chip) => chip.selected);
|
var selectedChipIndex = chipSet.chips.indexWhere((chip) => chip.selected!);
|
||||||
var chipParams = paramsForChip(selectedChipIndex);
|
var chipParams = paramsForChip(selectedChipIndex);
|
||||||
|
|
||||||
// Overwrite query parameters with new ones
|
// Overwrite query parameters with new ones
|
||||||
@@ -89,7 +89,7 @@ void setSearchBarText() {
|
|||||||
|
|
||||||
void setSelectedChips() {
|
void setSelectedChips() {
|
||||||
var type = queryParams.containsKey(typeKey) ? queryParams[typeKey] : '';
|
var type = queryParams.containsKey(typeKey) ? queryParams[typeKey] : '';
|
||||||
if (type.isNotEmpty) {
|
if (type!.isNotEmpty) {
|
||||||
if (type == 'sample') {
|
if (type == 'sample') {
|
||||||
chipSet.chips[1].selected = true;
|
chipSet.chips[1].selected = true;
|
||||||
}
|
}
|
||||||
@@ -101,7 +101,7 @@ void setSelectedChips() {
|
|||||||
// Apply the platform from the hash in the URL
|
// Apply the platform from the hash in the URL
|
||||||
var platform =
|
var platform =
|
||||||
queryParams.containsKey(platformKey) ? queryParams[platformKey] : '';
|
queryParams.containsKey(platformKey) ? queryParams[platformKey] : '';
|
||||||
if (platform.isNotEmpty) {
|
if (platform!.isNotEmpty) {
|
||||||
if (platform == 'web') {
|
if (platform == 'web') {
|
||||||
chipSet.chips[3].selected = true;
|
chipSet.chips[3].selected = true;
|
||||||
}
|
}
|
||||||
@@ -113,7 +113,7 @@ void setSelectedChips() {
|
|||||||
|
|
||||||
void handleSearch() {
|
void handleSearch() {
|
||||||
var search = searchBar.value;
|
var search = searchBar.value;
|
||||||
queryParams[searchKey] = search;
|
queryParams[searchKey] = search!;
|
||||||
filterCards();
|
filterCards();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ void filterCards() {
|
|||||||
var elements = querySelectorAll('[search-attrs]');
|
var elements = querySelectorAll('[search-attrs]');
|
||||||
for (var element in elements) {
|
for (var element in elements) {
|
||||||
var searchAttributes = element.attributes['search-attrs'];
|
var searchAttributes = element.attributes['search-attrs'];
|
||||||
if (matchesQuery(searchQuery, searchAttributes)) {
|
if (matchesQuery(searchQuery, searchAttributes!)) {
|
||||||
element.hidden = false;
|
element.hidden = false;
|
||||||
} else {
|
} else {
|
||||||
element.hidden = true;
|
element.hidden = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user