general 0.0.34 copy "general: ^0.0.34" to clipboard
general: ^0.0.34 copied to clipboard

General is Library for help you integrate any package commong used like audio, video, permission, location gamepad, local auth fingerprint, biometric, camera, and many more only use one library

example/lib/main.dart

import 'package:example/page/home/home.dart';
import 'package:flutter/material.dart';
import 'package:general/flutter/flutter.dart';
import 'package:general_lib_flutter/general_lib_flutter.dart';

void main(List<String> args) {
  WidgetsFlutterBinding.ensureInitialized();

  runApp(const GeneralExampleMainApp());
}

class GeneralExampleMainApp extends StatelessWidget {
  static GeneralLibFlutterApp generalLibFlutterApp = GeneralLibFlutterApp();
  static GeneralFlutter generalFlutter = GeneralFlutter();
  const GeneralExampleMainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return GeneralLibFlutterAppMain(
      generalLibFlutterApp: generalLibFlutterApp,
      builder: (themeMode, lightTheme, darkTheme, widget) {
        final MaterialApp materialApp = MaterialApp(
          themeMode: themeMode,
          theme: lightTheme,
          darkTheme: darkTheme,
          home: const GeneralExampleApp(),
          debugShowCheckedModeBanner: false,
        );
        return materialApp;
      },
    );
  }
}

class GeneralExampleApp extends StatefulWidget {
  const GeneralExampleApp({super.key});

  @override
  State<GeneralExampleApp> createState() => _GeneralExampleAppState();
}

class _GeneralExampleAppState extends State<GeneralExampleApp> {
  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    WidgetsBinding.instance.addPostFrameCallback((d) {
      task();
    });
  }

  task() async {
    setState(() {});
    Future(() async {
      GeneralExampleMainApp.generalLibFlutterApp.initState(
        context: context,
        themeMode: GeneralExampleMainApp.generalLibFlutterApp.themeMode,
        onSet: () {
          setState(() {});
        },
      );
      context.navigator().pushReplacement(MaterialPageRoute(
        builder: (context) {
          return const HomePageGeneralApp();
        },
      ));
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: CircularProgressIndicator(
          color: context.theme.indicatorColor,
        ),
      ),
    );
  }
}
3
likes
0
points
1.92k
downloads

Publisher

unverified uploader

Weekly Downloads

General is Library for help you integrate any package commong used like audio, video, permission, location gamepad, local auth fingerprint, biometric, camera, and many more only use one library

Repository (GitHub)
View/report issues

Documentation

Documentation

Funding

Consider supporting this project:

github.com
github.com

License

unknown (license)

Dependencies

camera, camera_windows, collection, file_picker, flutter, flutter_background, flutter_tts, general_lib, general_lib_flutter, html, image, local_auth, mason_logger, media_kit, media_kit_video, path, permission_handler, speech_to_text, universal_io, wakelock_plus, yaml, yaml_writer

More

Packages that depend on general