mirror of
https://github.com/flutter/samples.git
synced 2026-03-23 12:51:57 +00:00
Configuring travis to build Android. (#206)
This commit is contained in:
@@ -9,13 +9,28 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:flutter_module_using_plugin/main.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class MockCounterModel extends ChangeNotifier implements CounterModel {
|
||||
int _count = 0;
|
||||
|
||||
int get count => _count;
|
||||
|
||||
void increment() {
|
||||
_count++;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
||||
void main() {
|
||||
testWidgets('MiniView smoke test', (WidgetTester tester) async {
|
||||
// Build our app and trigger a frame.
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
home: Contents(),
|
||||
home: ChangeNotifierProvider<CounterModel>.value(
|
||||
value: MockCounterModel(),
|
||||
child: Contents(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user