Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced deprecated 'flutter pub run' with 'dart run' #554

Merged
merged 1 commit into from
May 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ flutter_native_splash:
# This package generates native code to customize Flutter's default white native splash screen
# with background color and splash image.
# Customize the parameters below, and run the following command in the terminal:
# flutter pub run flutter_native_splash:create
# dart run flutter_native_splash:create
# To restore Flutter's default white splash screen, run the following command in the terminal:
# flutter pub run flutter_native_splash:remove
# dart run flutter_native_splash:remove

# color or background_image is the only required parameter. Use color to set the background
# of your splash screen to a solid color. Use background_image to set the background of your
Expand Down Expand Up @@ -174,15 +174,15 @@ flutter_native_splash:
After adding your settings, run the following command in the terminal:

```
flutter pub run flutter_native_splash:create
dart run flutter_native_splash:create
```

When the package finishes running, your splash screen is ready.

To specify the YAML file location just add --path with the command in the terminal:

```
flutter pub run flutter_native_splash:create --path=path/to/my/file.yaml
dart run flutter_native_splash:create --path=path/to/my/file.yaml
```

## 3. Set up app initialization (optional)
Expand Down Expand Up @@ -319,13 +319,13 @@ The new command is:

```bash
# If you have a flavor called production you would do this:
flutter pub run flutter_native_splash:create --flavor production
dart run flutter_native_splash:create --flavor production

# For a flavor with a name staging you would provide it's name like so:
flutter pub run flutter_native_splash:create --flavor staging
dart run flutter_native_splash:create --flavor staging

# And if you have a local version for devs you could do that:
flutter pub run flutter_native_splash:create --flavor development
dart run flutter_native_splash:create --flavor development
```

### Android setup
Expand Down
4 changes: 2 additions & 2 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ The pubspec.yaml file has been modified to add a color and icon to the splash sc

```
flutter pub get
flutter pub run flutter_native_splash:create
dart run flutter_native_splash:create
```

Or, to try specifying a config by setting the path, run the following command in the terminal:

```
flutter pub get
flutter pub run flutter_native_splash:create --path=red.yaml
dart run flutter_native_splash:create --path=red.yaml
```

The updated splash screen will now appear when you run the app, followed by the secondary splash screen.
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ flutter_native_splash:
# This package generates native code to customize Flutter's default white native splash screen
# with background color and splash image.
# Customize the parameters below, and run the following command in the terminal:
# flutter pub run flutter_native_splash:create
# dart run flutter_native_splash:create
# To restore Flutter's default white splash screen, run the following command in the terminal:
# flutter pub run flutter_native_splash:remove
# dart run flutter_native_splash:remove

# color or background_image is the only required parameter. Use color to set the background
# of your splash screen to a solid color. Use background_image to set the background of your
Expand Down
2 changes: 1 addition & 1 deletion lib/flutter_native_splash.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class FlutterNativeSplash {
_channel.invokeMethod('remove');
} catch (e) {
throw Exception(
'$e\nDid you forget to run "flutter pub run flutter_native_splash:create"?',
'$e\nDid you forget to run "dart run flutter_native_splash:create"?',
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/flutter_native_splash_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class FlutterNativeSplashWeb {
removeSplashFromWeb();
} catch (e) {
throw Exception(
'Did you forget to run "flutter pub run flutter_native_splash:create"? \n Could not run the JS command removeSplashFromWeb()',
'Did you forget to run "dart run flutter_native_splash:create"? \n Could not run the JS command removeSplashFromWeb()',
);
}
return;
Expand Down