pull_to_refresh_notification 3.1.0 copy "pull_to_refresh_notification: ^3.1.0" to clipboard
pull_to_refresh_notification: ^3.1.0 copied to clipboard

Flutter plugin for building pull to refresh effects with PullToRefreshNotification and PullToRefreshContainer quickly.

example/lib/main.dart

import 'package:ff_annotation_route_library/ff_annotation_route_library.dart';
import 'package:flutter/material.dart';
import 'example_route.dart';
import 'example_routes.dart';

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'pull_to_refresh_notification demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      initialRoute: Routes.fluttercandiesMainpage,
      onGenerateRoute: (RouteSettings settings) {
        return onGenerateRoute(
          settings: settings,
          getRouteSettings: getRouteSettings,
          routeSettingsWrapper: (FFRouteSettings ffRouteSettings) {
            if (ffRouteSettings.name == Routes.fluttercandiesMainpage ||
                ffRouteSettings.name == Routes.fluttercandiesDemogrouppage ||
                settings.name == Routes.fluttercandiesPullToRefreshAppbar) {
              return ffRouteSettings;
            }
            return ffRouteSettings.copyWith(
                builder: () => CommonWidget(
                      child: ffRouteSettings.builder(),
                      title: ffRouteSettings.routeName,
                    ));
          },
        );
      },
    );
  }
}

class CommonWidget extends StatelessWidget {
  const CommonWidget({
    this.child,
    this.title,
  });
  final Widget? child;
  final String? title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(
          title!,
        ),
      ),
      body: child,
    );
  }
}
62
likes
150
pub points
94%
popularity

Publisher

verified publisherfluttercandies.com

Flutter plugin for building pull to refresh effects with PullToRefreshNotification and PullToRefreshContainer quickly.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on pull_to_refresh_notification