gitmoji 3.13.0+2 copy "gitmoji: ^3.13.0+2" to clipboard
gitmoji: ^3.13.0+2 copied to clipboard

outdated

All available Gitmoji as an Enum for Flutter

example/lib/main.dart

import 'dart:ui';

import 'package:example/core/core.dart';
import 'package:example/settings/settings.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_web_plugins/url_strategy.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:path_provider/path_provider.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  usePathUrlStrategy();

  HydratedBloc.storage = await HydratedStorage.build(
    storageDirectory: kIsWeb
        ? HydratedStorage.webStorageDirectory
        : await getApplicationDocumentsDirectory(),
  );

  runApp(
    BlocProvider(
      create: (context) => SettingsCubit(),
      child: const MyApp(),
    ),
  );
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      title: 'Gitmoji',
      routerConfig: AppRouter.router,
      debugShowCheckedModeBanner: false,
      theme: AppTheme.lightTheme,
      darkTheme: AppTheme.darkTheme,
      themeMode: context.select((SettingsCubit c) => c.state.themeMode),
      scrollBehavior: NoThumbScrollBehavior().copyWith(scrollbars: false),
    );
  }
}

class NoThumbScrollBehavior extends ScrollBehavior {
  @override
  Set<PointerDeviceKind> get dragDevices => {
        PointerDeviceKind.touch,
        PointerDeviceKind.mouse,
        PointerDeviceKind.stylus,
      };
}
2
likes
0
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

All available Gitmoji as an Enum for Flutter

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on gitmoji