mwwm 2.0.0 copy "mwwm: ^2.0.0" to clipboard
mwwm: ^2.0.0 copied to clipboard

Software architecture pattern for teams with different sizes. Add possibility to work separately. Separate UI, presentation logic and business logic.

example/lib/main.dart

import 'package:counter/data/counter/repository/counter_repository.dart';
import 'package:counter/data/counter/storage/shared_prefs.dart';
import 'package:counter/ui/app.dart';
import 'package:counter/ui/counter_screen/counter_wm.dart';
import 'package:counter/ui/counter_screen/exceptions/default_error_handler.dart';
import 'package:flutter/widgets.dart';
import 'package:mwwm/mwwm.dart';
import 'package:provider/provider.dart';

void main() {
  runApp(
    MultiProvider(
      providers: [
        Provider(
          create: (_) => SharedPrefs(),
        ),
        Provider(
          create: (context) => CounterRepository(
            context.read<SharedPrefs>(),
          ),
        ),
        ChangeNotifierProvider<CounterWidgetModel>(
          create: (context) => CounterWidgetModel(
            WidgetModelDependencies(
              errorHandler: DefaultErrorHandler(),
            ),
            context.read<CounterRepository>(),
          ),
        ),
      ],
      child: const App(),
    ),
  );
}
44
likes
140
pub points
43%
popularity

Publisher

verified publishersurf.ru

Software architecture pattern for teams with different sizes. Add possibility to work separately. Separate UI, presentation logic and business logic.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on mwwm