data_widget 0.0.2 copy "data_widget: ^0.0.2" to clipboard
data_widget: ^0.0.2 copied to clipboard

A data related helper widget and tools to help you build your flutter app faster with less code.

example/lib/main.dart

import 'package:data_widget/data_widget.dart';
import 'package:example/pages/home_page.dart';
import 'package:example/product.dart';
import 'package:flutter/material.dart';

import 'cart.dart';

void main() {
  runApp(const MyApp());
}

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final ProductManager productManager = ProductManager();
  final CartManager cartManager = CartManager();
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MultiData(
      data: [
        Data(productManager),
        Data(cartManager),
      ],
      child: MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
          useMaterial3: true,
        ),
        debugShowCheckedModeBanner: false,
        home: const HomePage(),
      ),
    );
  }
}
1
likes
160
points
852
downloads

Publisher

unverified uploader

Weekly Downloads

A data related helper widget and tools to help you build your flutter app faster with less code.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on data_widget