Skip to content

Commit

Permalink
Replaced deprecated 'flutter pub run' with 'dart run' (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
adeeteya committed May 28, 2023
1 parent 4f999f9 commit f584a7c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions README.md
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
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
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
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
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

0 comments on commit f584a7c

Please sign in to comment.