doso 1.1.1 copy "doso: ^1.1.1" to clipboard
doso: ^1.1.1 copied to clipboard

DoSo is a lightweight Dart library for simple and elegant error and state handling, designed to reduce boilerplate and avoid code generation in Flutter apps.

example/lib/main.dart

import 'package:example/data/data_source_impl.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

import 'data/fake_api.dart';
import 'data/repository_impl.dart';
import 'presentation/cubit.dart';
import 'presentation/screen.dart';

const appName = 'DoSo Example';

void main() {
  final http = FakeNetwork();
  final dataSource = DataSourceImpl(http);
  final repository = RepositoryImpl(dataSource);
  final cubit = MyCubit(repository);

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: appName,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const Screen(title: appName),
    );
  }
}
12
likes
160
points
386
downloads

Publisher

verified publishergruposbf.com.br

Weekly Downloads

DoSo is a lightweight Dart library for simple and elegant error and state handling, designed to reduce boilerplate and avoid code generation in Flutter apps.

Repository (GitHub)
View/report issues

Topics

#handle #error #state #quality

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

equatable, flutter

More

Packages that depend on doso