fading_tile 0.0.2 copy "fading_tile: ^0.0.2" to clipboard
fading_tile: ^0.0.2 copied to clipboard

Staggered motion animations for list / grid items.

example/lib/main.dart

import 'dart:async';

import 'package:app/app_widget.dart';
import 'package:app/services/log_service.dart';
import 'package:app/utils/build_config.dart';
import 'package:app/utils/locate.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

/// Initializes the app and configures dependencies.
///
/// When this is complete, the app is safe to move past the splash screen.
Future<void> initialize() async {
  WidgetsFlutterBinding.ensureInitialized();
  Provider.debugCheckInvalidValueType = null;
  await initializeBuildConfig();

  configureDependencies();
  locate<LogService>().d("App initialize completed.");
}

/// A preflight step where we may await some services or
/// functionality, before we leave the splash screen and launch
/// the Flutter app.
///
/// While this async function is being awaited, the app
/// stays on the native splash screen.
Future<void> preflight() async {
  // For what ever reason there are animations firing, if
  // the app launches too quick.
  //
  // In a real app this call would spend some ms awaiting
  // services, so just gonna put this here as a band aid fix.
  await Future.delayed(const Duration(milliseconds: 200));

  locate<LogService>().d("App preflight completed.");
}

Future<void> main() async {
  await initialize();
  await preflight();

  runApp(const AppWidget());
}
0
likes
140
pub points
0%
popularity

Publisher

verified publishervolskaya.dev

Staggered motion animations for list / grid items.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, other_animations

More

Packages that depend on fading_tile