elementary 1.1.0 copy "elementary: ^1.1.0" to clipboard
elementary: ^1.1.0 copied to clipboard

outdated

This is architecture library with the main goal to split code between different responsibility layers, make code clear, simple, readable and easy testable.

example/lib/main.dart

import 'package:counter/impl/screen/test_page_widget.dart';
import 'package:elementary/elementary.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Provider<TestErrorHandler>(
        create: (_) => TestErrorHandler(),
        child: const TestPageWidget(),
      ),
    );
  }
}

/// Error handler that print info to console
class TestErrorHandler implements ErrorHandler {
  @override
  void handleError(Object error) {
    if (kDebugMode) {
      print(error);
    }
  }
}
173
likes
0
pub points
90%
popularity

Publisher

verified publisherelementaryteam.dev

This is architecture library with the main goal to split code between different responsibility layers, make code clear, simple, readable and easy testable.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on elementary