dock_flutter 0.0.1 copy "dock_flutter: ^0.0.1" to clipboard
dock_flutter: ^0.0.1 copied to clipboard

A software kit for developing Flutter apps easy and fast.

example/lib/main.dart

import 'package:dock_flutter/dock.dart';
import 'package:dock_flutter_example/core/navigation/app_router/app_router.dart';
import 'package:dock_flutter_example/core/navigation/navigation_observer/navigation_observer.dart';
import 'package:dock_flutter_example/product/constants/app_constants.dart';
import 'package:flutter/material.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    final appRouter = Locator.isRegistered<AppRouter>()
        ? Locator.find<AppRouter>()
        : Locator.register<AppRouter>(
            AppRouter(),
          );

    return MaterialApp.router(
      routerConfig: appRouter.config(
        navigatorObservers: () => [
          if (Locator.isRegistered<CustomNavigationObserver>())
            Locator.find<CustomNavigationObserver>()
          else
            Locator.register<CustomNavigationObserver>(
              CustomNavigationObserver(),
            ),
        ],
      ),
      theme: AppConstants.themeConstants.material3,
    );
  }
}
1
likes
130
points
29
downloads

Publisher

verified publisherkorayliman.com

Weekly Downloads

A software kit for developing Flutter apps easy and fast.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface, very_good_analysis

More

Packages that depend on dock_flutter