Skip to content

Instantly share code, notes, and snippets.

@by90
by90 / main.dart
Created March 24, 2021 08:56 — forked from chunhtai/main.dart
import 'dart:collection';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@by90
by90 / main.dart
Created March 24, 2021 08:56
[Basic implementation of declarative routes] #Flutter
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
enum PossibleAppParams {
phoneId,
}
enum PossibleAppRoutes {
unknown,
home,
@by90
by90 / main.dart
Created March 24, 2021 08:57 — forked from Sandfone/main.dart
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
void main() {
runApp(MyApp());
}
import 'package:flutter/material.dart';
void main() {
runApp(
App(),
);
}
class App extends StatefulWidget {
@override
import 'package:flutter/material.dart';
PageTypes _toPageType(String key) => PageTypes.values.firstWhere((v) => "$v" == key, orElse: () => null);
enum PageTypes {
Page1,
Page2,
Page3,
}
class AppInformationParser extends RouteInformationParser<NavModel> {
@by90
by90 / main.dart
Created March 24, 2021 08:59 — forked from magicleon94/main.dart
Flutter Navigator 2.0 + Notification test
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
@by90
by90 / main.dart
Created March 24, 2021 08:59 — forked from jonasjuni/main.dart
Flutter Navigator v2.0 parent delegates child to pop example
import 'package:flutter/material.dart';
void main() => runApp(NestedRouterDemo());
//Model???
class Book {
final String title;
final String author;
Book(this.title, this.author);
@by90
by90 / main.dart
Last active May 12, 2021 09:09 — forked from chunhtai/main.dart
flutter团队成员,最初的例子
// Copyright 2021, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() {
runApp(BooksApp());
}
@by90
by90 / main.dart
Last active June 8, 2021 08:11 — forked from johnpryan/main.dart
book例子:使用底部导航,navigator2.0 ,包括Navigation Rail + Router + Animations
import 'package:flutter/material.dart';
void main() {
runApp(NestedRouterDemo());
}
class Book {
final String title;
final String author;