1
0
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:
Andrew Brogdon
2020-01-06 13:41:33 -08:00
committed by GitHub
parent 4a01a6570e
commit 233eb462d4
9 changed files with 90 additions and 22 deletions

View File

@@ -6,7 +6,6 @@ apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 28
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "dev.flutter.example.androidfullscreen"
minSdkVersion 19

View File

@@ -6,7 +6,6 @@ apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 28
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "dev.flutter.example.androidusingplugin"
minSdkVersion 19

View File

@@ -6,7 +6,6 @@ apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 28
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "dev.flutter.example.androidusingprebuiltmodule"
minSdkVersion 19

View File

@@ -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

View File

@@ -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(),
),
),
);

View File

@@ -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

View File

@@ -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(),
),
),
);