mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Configuring travis to build Android. (#206)
This commit is contained in:
@@ -6,7 +6,6 @@ apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion "29.0.2"
|
||||
defaultConfig {
|
||||
applicationId "dev.flutter.example.androidfullscreen"
|
||||
minSdkVersion 19
|
||||
|
||||
@@ -6,7 +6,6 @@ apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion "29.0.2"
|
||||
defaultConfig {
|
||||
applicationId "dev.flutter.example.androidusingplugin"
|
||||
minSdkVersion 19
|
||||
|
||||
@@ -6,7 +6,6 @@ apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion "29.0.2"
|
||||
defaultConfig {
|
||||
applicationId "dev.flutter.example.androidusingprebuiltmodule"
|
||||
minSdkVersion 19
|
||||
|
||||
@@ -23,7 +23,7 @@ void main() {
|
||||
}
|
||||
|
||||
/// A simple model that uses a [MethodChannel] as the source of truth for the
|
||||
/// state of the counter.
|
||||
/// state of a counter.
|
||||
///
|
||||
/// Rather than storing app state data within the Flutter module itself (where
|
||||
/// the native portions of the app can't access it), this module passes messages
|
||||
|
||||
@@ -9,13 +9,28 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:flutter_module/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(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ void main() {
|
||||
}
|
||||
|
||||
/// A simple model that uses a [MethodChannel] as the source of truth for the
|
||||
/// state of the counter.
|
||||
/// state of a counter.
|
||||
///
|
||||
/// Rather than storing app state data within the Flutter module itself (where
|
||||
/// the native portions of the app can't access it), this module passes messages
|
||||
|
||||
@@ -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