elementary_test 0.1.1 copy "elementary_test: ^0.1.1" to clipboard
elementary_test: ^0.1.1 copied to clipboard

outdated

A testing library which makes it easy to test elementary used apps. Built to be used with the elementary architecture package.

example/lib/main.dart

import 'package:counter/impl/screen/test_page_model.dart';
import 'package:counter/impl/screen/test_page_widget.dart';
import 'package:elementary/elementary.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: MultiProvider(
        providers: [
          Provider<TestPageModel>(
            create: (_) => TestPageModel(
              TestErrorHandler(),
            ),
          ),
          Provider<ThemeWrapper>(
            create: (_) => ThemeWrapper(),
          ),
        ],
        child: const TestPageWidget(),
      ),
    );
  }
}

class TestErrorHandler implements ErrorHandler {
  @override
  void handleError(Object error) {
    // ignore: avoid_print
    print(error);
  }
}
25
likes
0
pub points
72%
popularity

Publisher

verified publisherelementaryteam.dev

A testing library which makes it easy to test elementary used apps. Built to be used with the elementary architecture package.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

elementary, flutter, flutter_test, meta, mocktail

More

Packages that depend on elementary_test