mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +00:00
web/samples_index Drop unused links attribute from config (#1828)
I've confirmed that the `links` configuration attribute is indeed unused: https://flutter.github.io/samples/next_gen_u_i_demo.html Dropping unused configuration sounds like a good move. We can re-introduce it if/when we start displaying the content. ## Pre-launch Checklist - [x] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [x] I signed the [CLA]. - [x] I read the [Contributors Guide]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-devrel channel on [Discord]. <!-- Links --> [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/wiki/Chat [Contributors Guide]: https://github.com/flutter/samples/blob/main/CONTRIBUTING.md
This commit is contained in:
@@ -68,9 +68,6 @@ class Sample {
|
|||||||
/// 'web'
|
/// 'web'
|
||||||
final List<String> platforms;
|
final List<String> platforms;
|
||||||
|
|
||||||
/// Links to display on the details page
|
|
||||||
final List<Link> links;
|
|
||||||
|
|
||||||
/// The type of the sample. Supported values are either 'sample' or
|
/// The type of the sample. Supported values are either 'sample' or
|
||||||
/// 'cookbook'.
|
/// 'cookbook'.
|
||||||
final String type;
|
final String type;
|
||||||
@@ -94,7 +91,6 @@ class Sample {
|
|||||||
this.packages = const [],
|
this.packages = const [],
|
||||||
this.tags = const [],
|
this.tags = const [],
|
||||||
this.platforms = const [],
|
this.platforms = const [],
|
||||||
this.links = const [],
|
|
||||||
required this.type,
|
required this.type,
|
||||||
this.date,
|
this.date,
|
||||||
this.channel,
|
this.channel,
|
||||||
@@ -172,16 +168,3 @@ class Screenshot {
|
|||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ScreenshotToJson(this);
|
Map<String, dynamic> toJson() => _$ScreenshotToJson(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An external link displayed next to a sample
|
|
||||||
@JsonSerializable(anyMap: true, checked: true)
|
|
||||||
class Link {
|
|
||||||
final String text;
|
|
||||||
final String href;
|
|
||||||
|
|
||||||
Link(this.text, this.href);
|
|
||||||
|
|
||||||
factory Link.fromJson(Map<dynamic, dynamic> json) => _$LinkFromJson(json);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$LinkToJson(this);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -62,13 +62,6 @@ Sample _$SampleFromJson(Map json) => $checkedCreate(
|
|||||||
(v) =>
|
(v) =>
|
||||||
(v as List<dynamic>?)?.map((e) => e as String).toList() ??
|
(v as List<dynamic>?)?.map((e) => e as String).toList() ??
|
||||||
const []),
|
const []),
|
||||||
links: $checkedConvert(
|
|
||||||
'links',
|
|
||||||
(v) =>
|
|
||||||
(v as List<dynamic>?)
|
|
||||||
?.map((e) => Link.fromJson(e as Map))
|
|
||||||
.toList() ??
|
|
||||||
const []),
|
|
||||||
type: $checkedConvert('type', (v) => v as String),
|
type: $checkedConvert('type', (v) => v as String),
|
||||||
date: $checkedConvert(
|
date: $checkedConvert(
|
||||||
'date', (v) => v == null ? null : DateTime.parse(v as String)),
|
'date', (v) => v == null ? null : DateTime.parse(v as String)),
|
||||||
@@ -90,7 +83,6 @@ Map<String, dynamic> _$SampleToJson(Sample instance) => <String, dynamic>{
|
|||||||
'packages': instance.packages,
|
'packages': instance.packages,
|
||||||
'tags': instance.tags,
|
'tags': instance.tags,
|
||||||
'platforms': instance.platforms,
|
'platforms': instance.platforms,
|
||||||
'links': instance.links,
|
|
||||||
'type': instance.type,
|
'type': instance.type,
|
||||||
'date': instance.date?.toIso8601String(),
|
'date': instance.date?.toIso8601String(),
|
||||||
'channel': instance.channel,
|
'channel': instance.channel,
|
||||||
@@ -113,20 +105,3 @@ Map<String, dynamic> _$ScreenshotToJson(Screenshot instance) =>
|
|||||||
'url': instance.url,
|
'url': instance.url,
|
||||||
'alt': instance.alt,
|
'alt': instance.alt,
|
||||||
};
|
};
|
||||||
|
|
||||||
Link _$LinkFromJson(Map json) => $checkedCreate(
|
|
||||||
'Link',
|
|
||||||
json,
|
|
||||||
($checkedConvert) {
|
|
||||||
final val = Link(
|
|
||||||
$checkedConvert('text', (v) => v as String),
|
|
||||||
$checkedConvert('href', (v) => v as String),
|
|
||||||
);
|
|
||||||
return val;
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$LinkToJson(Link instance) => <String, dynamic>{
|
|
||||||
'text': instance.text,
|
|
||||||
'href': instance.href,
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ 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
|
||||||
@@ -106,7 +105,6 @@ 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: Code Sharing
|
- name: Code Sharing
|
||||||
@@ -124,7 +122,6 @@ samples:
|
|||||||
- shelf
|
- shelf
|
||||||
tags: ['intermediate', 'sample', 'code-sharing', 'dart', 'server']
|
tags: ['intermediate', 'sample', 'code-sharing', 'dart', 'server']
|
||||||
platforms: ['android', 'ios', 'linux', 'macos', 'web', 'windows']
|
platforms: ['android', 'ios', 'linux', 'macos', 'web', 'windows']
|
||||||
links: []
|
|
||||||
type: sample
|
type: sample
|
||||||
|
|
||||||
- name: Animations
|
- name: Animations
|
||||||
@@ -153,7 +150,6 @@ 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
|
||||||
|
|
||||||
@@ -178,7 +174,6 @@ 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
|
||||||
@@ -203,7 +198,6 @@ 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
|
||||||
@@ -232,7 +226,6 @@ 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
|
||||||
@@ -259,7 +252,6 @@ 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
|
||||||
@@ -291,7 +283,6 @@ 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
|
||||||
@@ -313,7 +304,6 @@ 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
|
||||||
@@ -338,7 +328,6 @@ 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
|
||||||
@@ -359,7 +348,6 @@ 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
|
||||||
@@ -382,7 +370,6 @@ 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
|
||||||
@@ -406,7 +393,6 @@ 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
|
||||||
|
|
||||||
@@ -433,7 +419,6 @@ 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
|
||||||
|
|
||||||
@@ -455,7 +440,6 @@ 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
|
||||||
|
|
||||||
@@ -480,7 +464,6 @@ samples:
|
|||||||
packages: []
|
packages: []
|
||||||
tags: ['advanced', 'sample', 'navigation', 'router']
|
tags: ['advanced', 'sample', 'navigation', 'router']
|
||||||
platforms: ['ios', 'android', 'web']
|
platforms: ['ios', 'android', 'web']
|
||||||
links: []
|
|
||||||
type: sample
|
type: sample
|
||||||
web: web/navigation_and_routing
|
web: web/navigation_and_routing
|
||||||
|
|
||||||
@@ -522,7 +505,6 @@ samples:
|
|||||||
widgets: []
|
widgets: []
|
||||||
packages: []
|
packages: []
|
||||||
platforms: ['web']
|
platforms: ['web']
|
||||||
links: []
|
|
||||||
tags: ['demo', 'game']
|
tags: ['demo', 'game']
|
||||||
type: demo
|
type: demo
|
||||||
|
|
||||||
@@ -546,7 +528,6 @@ samples:
|
|||||||
widgets:
|
widgets:
|
||||||
- TextInput
|
- TextInput
|
||||||
packages: []
|
packages: []
|
||||||
links: []
|
|
||||||
tags: ["demo", "text"]
|
tags: ["demo", "text"]
|
||||||
platforms: ["ios", "android", "web", "windows", "macos", "linux"]
|
platforms: ["ios", "android", "web", "windows", "macos", "linux"]
|
||||||
type: demo
|
type: demo
|
||||||
@@ -579,7 +560,6 @@ samples:
|
|||||||
- Card
|
- Card
|
||||||
- AppBar
|
- AppBar
|
||||||
packages: []
|
packages: []
|
||||||
links: []
|
|
||||||
tags: ["material", "design"]
|
tags: ["material", "design"]
|
||||||
platforms: ["ios", "android", "web", "windows", "macos", "linux"]
|
platforms: ["ios", "android", "web", "windows", "macos", "linux"]
|
||||||
type: demo
|
type: demo
|
||||||
@@ -611,7 +591,6 @@ samples:
|
|||||||
- logging
|
- logging
|
||||||
- provider
|
- provider
|
||||||
- shared_preferences
|
- shared_preferences
|
||||||
links: []
|
|
||||||
tags: ["games", "firebase", "ads", "crashlytics", "routing"]
|
tags: ["games", "firebase", "ads", "crashlytics", "routing"]
|
||||||
platforms: ["ios", "android", "web", "windows", "macos", "linux"]
|
platforms: ["ios", "android", "web", "windows", "macos", "linux"]
|
||||||
type: demo
|
type: demo
|
||||||
@@ -629,7 +608,6 @@ 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
|
||||||
@@ -648,7 +626,6 @@ samples:
|
|||||||
widgets: []
|
widgets: []
|
||||||
packages: []
|
packages: []
|
||||||
platforms: ['web']
|
platforms: ['web']
|
||||||
links: []
|
|
||||||
tags: ['demo', 'web', 'add-to-app', 'embedding']
|
tags: ['demo', 'web', 'add-to-app', 'embedding']
|
||||||
web: https://flutter-angular.web.app/
|
web: https://flutter-angular.web.app/
|
||||||
type: sample
|
type: sample
|
||||||
@@ -665,8 +642,5 @@ samples:
|
|||||||
- flutter_animate
|
- flutter_animate
|
||||||
platforms:
|
platforms:
|
||||||
- Windows, macOS, Linux, web, Android, iOS
|
- Windows, macOS, Linux, web, Android, iOS
|
||||||
links:
|
|
||||||
- href: https://codelabs.developers.google.com/codelabs/flutter-next-gen-uis
|
|
||||||
text: Codelab
|
|
||||||
type: sample
|
type: sample
|
||||||
web: web/next_gen_ui_demo
|
web: web/next_gen_ui_demo
|
||||||
|
|||||||
@@ -38,9 +38,6 @@ void main() {
|
|||||||
expect(sample.tags, hasLength(3));
|
expect(sample.tags, hasLength(3));
|
||||||
expect(sample.tags[1], 'kittens');
|
expect(sample.tags[1], 'kittens');
|
||||||
expect(sample.platforms, hasLength(3));
|
expect(sample.platforms, hasLength(3));
|
||||||
expect(sample.links, hasLength(2));
|
|
||||||
expect(sample.links[1].text, 'author');
|
|
||||||
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');
|
||||||
|
|||||||
@@ -16,11 +16,6 @@ samples:
|
|||||||
- path
|
- path
|
||||||
tags: ['beginner', 'kittens', 'cats']
|
tags: ['beginner', 'kittens', 'cats']
|
||||||
platforms: ['web', 'ios', 'android']
|
platforms: ['web', 'ios', 'android']
|
||||||
links:
|
|
||||||
- text: inspiration
|
|
||||||
href: https://apps.apple.com/us/app/neko-atsume-kitty-collector/id923917775
|
|
||||||
- text: author
|
|
||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user