data_management 0.1.2-alpha1 copy "data_management: ^0.1.2-alpha1" to clipboard
data_management: ^0.1.2-alpha1 copied to clipboard

Collection of service with advanced style and controlling system.

example/lib/main.dart

import 'package:data_management/core.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

import 'api_data_test.dart';
import 'di.dart';
import 'firebase_firestore_data_test.dart';
import 'firebase_realtime_data_test.dart';
import 'local_data_test.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
  await diInit();
  runApp(const Application());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: Scaffold(
        body: SafeArea(
          child: Center(
            child: MultiBlocProvider(
              providers: [
                BlocProvider(
                  create: (context) => locator<LocalDataController<Cart>>(),
                ),
                BlocProvider(
                  create: (context) => locator<RemoteDataController<Post>>(),
                ),
                BlocProvider(
                  create: (context) => locator<RemoteDataController<Product>>(),
                ),
                BlocProvider(
                  create: (context) => locator<RemoteDataController<User>>(),
                ),
              ],
              child: const ApiDataTest(),
            ),
          ),
        ),
      ),
    );
  }
}
3
likes
0
points
203
downloads

Publisher

unverified uploader

Weekly Downloads

Collection of service with advanced style and controlling system.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cloud_firestore, dio, firebase_database, flutter, flutter_andomie, flutter_bloc

More

Packages that depend on data_management