mirror of
https://github.com/flutter/samples.git
synced 2025-11-09 06:18:49 +00:00
Add workflow to deploy the sample index (#791)
* Add workflow to build and deploy the sample index * update gh-pages action * fix yaml * create web/ directory in build * grammar * add ignored directories * revert pubspec.lock files * add job to run _tool/verify_samples.dart * Update filipino_cuisine for Flutter 2 * remove timeflow demo. The unnamed List constructor is now deprecated, refactoring this code to use add() requires more knowledge about the code for this demo. https://dart.dev/null-safety/understanding-null-safety#no-unnamed-list-constructor * update slide_puzzle * ensure stable channel is used to verify * move verify web demos action into separate yaml file - avoid running on each flutter version. * add on: pull_request * update slide_puzzle * Update gh-pages.yml * Add copyright header
This commit is contained in:
@@ -46,7 +46,7 @@ class _MainLayoutState extends State<MainLayout> with TickerProviderStateMixin {
|
||||
|
||||
createAnimation(0);
|
||||
|
||||
weekLabels = List();
|
||||
weekLabels = <WeekLabel>[];
|
||||
weekLabels.add(WeekLabel.forDate(DateTime(2019, 2, 26), "v1.2"));
|
||||
weekLabels.add(WeekLabel.forDate(DateTime(2018, 12, 4), "v1.0"));
|
||||
// weekLabels.add(WeekLabel.forDate(new DateTime(2018, 9, 19), "Preview 2"));
|
||||
@@ -79,9 +79,9 @@ class _MainLayoutState extends State<MainLayout> with TickerProviderStateMixin {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// Combined contributions data
|
||||
List<DataSeries> dataToPlot = List();
|
||||
List<DataSeries> dataToPlot = [];
|
||||
if (contributions != null) {
|
||||
List<int> series = List();
|
||||
List<int> series = [];
|
||||
for (UserContribution userContrib in contributions) {
|
||||
for (int i = 0; i < userContrib.contributions.length; i++) {
|
||||
ContributionData data = userContrib.contributions[i];
|
||||
@@ -228,7 +228,7 @@ class _MainLayoutState extends State<MainLayout> with TickerProviderStateMixin {
|
||||
|
||||
List<StatForWeek> summarizeWeeksFromTSV(
|
||||
String statByWeekStr, int numWeeksTotal) {
|
||||
List<StatForWeek> loadedStats = List();
|
||||
List<StatForWeek> loadedStats = [];
|
||||
HashMap<int, StatForWeek> statMap = HashMap();
|
||||
statByWeekStr.split("\n").forEach((s) {
|
||||
List<String> split = s.split("\t");
|
||||
@@ -237,7 +237,8 @@ class _MainLayoutState extends State<MainLayout> with TickerProviderStateMixin {
|
||||
statMap[weekNum] = StatForWeek(weekNum, int.parse(split[1]));
|
||||
}
|
||||
});
|
||||
print("Laoded ${statMap.length} weeks.");
|
||||
print("Loaded ${statMap.length} weeks.");
|
||||
|
||||
// Convert into a list by week, but fill in empty weeks with 0
|
||||
for (int i = 0; i < numWeeksTotal; i++) {
|
||||
StatForWeek starsForWeek = statMap[i];
|
||||
|
||||
Reference in New Issue
Block a user