flutter_driver_fast_restart 0.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 65

fast_driver_test_restart #

Fast driver test restart.

Getting Started #

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

[0.0.1] - 15.12.2019

  • Initial release.

example/main.dart

import 'package:flutter_driver_fast_restart/flutter_driver_fast_restart.dart';
import 'package:flutter_driver_fast_restart/flutter_driver_extensions.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_driver/driver_extension.dart';
import 'package:flutter/scheduler.dart' show timeDilation;
import 'package:flutter_driver/flutter_driver.dart';

void main() async {
  final restartController = RestartController();
  enableFlutterDriverExtension(handler: (request) async {
    restartController.add(request);
    return ""; // Return any String result you might need.
  });
  timeDilation = 0.01; // you might want to change dilation to speedup e2e tests
  runApp(RestartWidget(
    restartController: restartController,
    builder: (context, data) => MyApp(data: data),
  ));

  // Somewhere in your tests
  final driver = await FlutterDriver.connect();

  driver.restart("some configuration");

  // Close the driver when unnecessary.
  driver.close();
}

class MyApp extends StatelessWidget {
  final String data;

  const MyApp({Key key, @required this.data}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        body: Center(
          child: Text("Hello world! $data"),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_driver_fast_restart: ^0.0.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_driver_fast_restart/flutter_driver_fast_restart.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
42
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
65
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health suggestions

Format lib/src/restart_config.dart.

Run flutter format to format lib/src/restart_config.dart.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
flutter 0.0.0
flutter_driver 0.0.0
Transitive dependencies
archive 2.0.11 2.0.13
args 1.5.2
async 2.4.0
boolean_selector 1.0.5
charcode 1.1.2
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.1.3 2.1.4
file 5.1.0
flutter_test 0.0.0
fuchsia_remote_debug_protocol 0.0.0
image 2.1.4 2.1.12
intl 0.16.0 0.16.1
json_rpc_2 2.1.0
matcher 0.12.6
meta 1.1.8
path 1.6.4
pedantic 1.8.0+1 1.9.0
petitparser 2.4.0 3.0.0
platform 2.2.1
process 3.0.12
pub_semver 1.4.2
quiver 2.0.5 2.1.2+1
sky_engine 0.0.99
source_span 1.5.5 1.6.0
stack_trace 1.9.3
stream_channel 2.0.0
string_scanner 1.0.5
term_glyph 1.1.0
test_api 0.2.11 0.2.13
typed_data 1.1.6
vector_math 2.0.8
vm_service_client 0.2.6+2 0.2.6+3
web_socket_channel 1.1.0
xml 3.5.0 3.7.0
Dev dependencies
effective_dart ^1.1.0