Skip to content

Commit

Permalink
🚨 修复告警
Browse files Browse the repository at this point in the history
  • Loading branch information
BytesZero committed Nov 27, 2024
1 parent 4516950 commit 690527f
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 31 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ jobs:
- run: cd example && flutter build apk
# Build ios
- run: cd example && flutter build ios --no-codesign
# Build ios
- run: cd example && flutter build macos
22 changes: 9 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,21 @@

#### Open App Store Page

| Platform | Screenshot |
|----------|-------------|
| iOS | <img src="https://raw.githubusercontent.com/BytesZero/app_installer/master/images/iOS_Go_Store.gif" width="220"/> |
| Android | <img src="https://raw.githubusercontent.com/BytesZero/app_installer/master/images/Android_Go_Store.gif" width="220"/> |
| MacOS | <img src="https://raw.githubusercontent.com/BytesZero/app_installer/master/images/MacOS_Go_Store.png" width="220"/> |
| iOS | Android | MacOS |
|-----|---------|-------|
| <img src="https://raw.githubusercontent.com/BytesZero/app_installer/master/images/iOS_Go_Store.gif" width="220"/> | <img src="https://raw.githubusercontent.com/BytesZero/app_installer/master/images/Android_Go_Store.gif" width="220"/> | <img src="https://raw.githubusercontent.com/BytesZero/app_installer/master/images/MacOS_Go_Store.png" width="220"/> |

#### App Store Reviews

| Platform | Screenshot |
|----------|-------------|
| iOS | <img src="https://raw.githubusercontent.com/BytesZero/app_installer/master/images/review_ios.png" width="220"/> |
| Android | _Not Available_ |
| MacOS | <img src="https://raw.githubusercontent.com/BytesZero/app_installer/master/images/review_macos.png" width="220"/> |
| iOS | Android | MacOS |
|-----|---------|-------|
| <img src="https://raw.githubusercontent.com/BytesZero/app_installer/master/images/review_ios.png" width="220"/> | _Not Available_ | <img src="https://raw.githubusercontent.com/BytesZero/app_installer/master/images/review_macos.png" width="220"/> |

#### Install APK File

| Platform | Screenshot |
|----------|-------------|
| Android | <img src="https://raw.githubusercontent.com/BytesZero/app_installer/master/images/install_apk.gif" width="220"/> |
| Android |
|---------|
| <img src="https://raw.githubusercontent.com/BytesZero/app_installer/master/images/install_apk.gif" width="220"/> |

> ⚠️ You need to allow read storage permission first on Android, otherwise there will be a parsing error ⚠️
Expand Down
28 changes: 15 additions & 13 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import 'package:flutter/material.dart';
import 'package:app_installer/app_installer.dart';

void main() => runApp(MyApp());
void main() => runApp(const MyApp());

class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);

@override
_MyAppState createState() => _MyAppState();
MyAppState createState() => MyAppState();
}

class _MyAppState extends State<MyApp> {
class MyAppState extends State<MyApp> {
/// 应用市场信息
String androidAppId = 'com.tengyue360.student';
String iOSAppId = '1440249706';
Expand All @@ -24,7 +26,7 @@ class _MyAppState extends State<MyApp> {
body: Center(
child: Column(
children: <Widget>[
SizedBox(height: 80),
const SizedBox(height: 80),
TextButton.icon(
onPressed: () {
AppInstaller.goStore(
Expand All @@ -33,10 +35,10 @@ class _MyAppState extends State<MyApp> {
macOSAppId: macOSAppId,
);
},
icon: Icon(Icons.store),
label: Text('Go Store'),
icon: const Icon(Icons.store),
label: const Text('Go Store'),
),
SizedBox(height: 40),
const SizedBox(height: 40),
TextButton.icon(
onPressed: () {
AppInstaller.goStore(
Expand All @@ -46,11 +48,11 @@ class _MyAppState extends State<MyApp> {
review: true,
);
},
icon: Icon(Icons.rate_review),
label: Text('Go Store Review'),
icon: const Icon(Icons.rate_review),
label: const Text('Go Store Review'),
),
SizedBox(height: 40),
Text(
const SizedBox(height: 40),
const Text(
'⚠️需要先允许读取存储权限才可以⚠️',
style: TextStyle(color: Colors.red),
),
Expand All @@ -61,8 +63,8 @@ class _MyAppState extends State<MyApp> {
// 需要先允许读取存储权限才可以
AppInstaller.installApk('/sdcard/app/app-debug.apk');
},
icon: Icon(Icons.arrow_downward),
label: Text('Install Apk'),
icon: const Icon(Icons.arrow_downward),
label: const Text('Install Apk'),
),
],
),
Expand Down
8 changes: 4 additions & 4 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ environment:
dependencies:
flutter:
sdk: flutter


app_installer:
path: ../
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
Expand All @@ -18,9 +20,7 @@ dev_dependencies:
flutter_test:
sdk: flutter

app_installer:
path: ../

flutter_lints: ^4.0.0 # 代码规范检查 https://pub.dev/packages/flutter_lints
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

Expand Down
2 changes: 1 addition & 1 deletion example/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ import 'package:app_installer_example/main.dart';
void main() {
testWidgets('Verify Platform version', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
await tester.pumpWidget(const MyApp());
});
}

0 comments on commit 690527f

Please sign in to comment.