basf_flutter_components 2.9.0 copy "basf_flutter_components: ^2.9.0" to clipboard
basf_flutter_components: ^2.9.0 copied to clipboard

A collection of BASF Style components such as Buttons, Theming, etc...

example/lib/main.dart

import 'package:basf_flutter_components/basf_flutter_components.dart';
import 'package:basf_flutter_components_example/screens/overview.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

final RouteObserver<ModalRoute<void>> routeObserver = RouteObserver();

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  HydratedBloc.storage = await HydratedStorage.build(
    storageDirectory: kIsWeb
        ? HydratedStorageDirectory.web
        : HydratedStorageDirectory((await getTemporaryDirectory()).path),
  );

  runApp(const ExampleApp());
}

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'BASF Components',
      theme: BasfThemes.lightMainTheme(),
      home: const OverviewScreen(),
      navigatorObservers: [routeObserver],
      localizationsDelegates:
          BasfComponentsLocalizations.localizationsDelegates,
      supportedLocales: BasfComponentsLocalizations.supportedLocales,
    );
  }
}