extended_list 3.0.0-non-null-safety extended_list: ^3.0.0-non-null-safety copied to clipboard
extended list support track collect garbage/viewport indexes, build lastChild as special child and enable to layout close to trailing.
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'example_route.dart';
import 'example_route_helper.dart';
import 'example_routes.dart';
///
/// create by zmtzawqlp on 2019/11/23
///
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'ExtendedList Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
),
initialRoute: Routes.fluttercandiesMainpage,
onGenerateRoute: (RouteSettings settings) {
//when refresh web, route will as following
// /
// /fluttercandies:
// /fluttercandies:/
// /fluttercandies://mainpage
if (kIsWeb && settings.name.startsWith('/')) {
return onGenerateRouteHelper(
settings.copyWith(name: settings.name.replaceFirst('/', '')),
notFoundFallback:
getRouteResult(name: Routes.fluttercandiesMainpage).widget,
);
}
return onGenerateRouteHelper(settings);
},
);
}
}