extended_nested_scroll_view 0.3.9 copy "extended_nested_scroll_view: ^0.3.9" to clipboard
extended_nested_scroll_view: ^0.3.9 copied to clipboard

outdated

extended nested scroll view to fix pinned header and inner scrollables sync issues.

example/lib/main.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart' hide NestedScrollView;

import 'example_route.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  MyApp();
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        debugShowCheckedModeBanner: false,
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        builder: (c, w) {
          if (kIsWeb) return w;
          var data = MediaQuery.of(c);
          return MediaQuery(
            data: data.copyWith(textScaleFactor: 1.0),
            child: w,
          );
        },
        initialRoute: "fluttercandies://mainpage",
        onGenerateRoute: (RouteSettings settings) {
          var routeName = settings.name;
          //when refresh web, route will as following
          //   /
          //   /fluttercandies:
          //   /fluttercandies:/
          //   /fluttercandies://mainpage

          if (kIsWeb && routeName.startsWith('/')) {
            routeName = routeName.replaceFirst('/', '');
          }

          var routeResult =
              getRouteResult(name: routeName, arguments: settings.arguments);

          var page = routeResult.widget ??
              getRouteResult(
                      name: 'fluttercandies://mainpage',
                      arguments: settings.arguments)
                  .widget;

          final platform = Theme.of(context).platform;

          return platform == TargetPlatform.iOS
              ? CupertinoPageRoute(settings: settings, builder: (c) => page)
              : MaterialPageRoute(settings: settings, builder: (c) => page);
        });
  }
}
282
likes
0
pub points
98%
popularity

Publisher

verified publisherfluttercandies.com

extended nested scroll view to fix pinned header and inner scrollables sync issues.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on extended_nested_scroll_view