Skip to content

Commit

Permalink
Added path argument to command line. Thanks [@lyledean1](https://gith…
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbhanson committed Jun 9, 2021
1 parent 5db4628 commit cc2ad32
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## [1.1.9] - (2021-Jun-09)

* Added path argument to command line. Thanks [@lyledean1](https://github.com/lyledean1) for PR [#180](https://github.com/jonbhanson/flutter_native_splash/pull/180).

## [1.1.8+4] - (2021-Apr-20)

* Fixed bug that was preventing copying of dark background. Fixes [#163](https://github.com/jonbhanson/flutter_native_splash/issues/163).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -17,7 +17,7 @@ First, add `flutter_native_splash` as a dev dependency in your pubspec.yaml file

```yaml
dev_dependencies:
flutter_native_splash: ^1.1.8+4
flutter_native_splash: ^1.1.9
```

Don't forget to `flutter pub get`.
Expand Down
2 changes: 1 addition & 1 deletion bin/create.dart
Expand Up @@ -5,6 +5,6 @@ import 'package:flutter_native_splash/flutter_native_splash.dart'
void main(List<String> args) {
var parser = ArgParser();
parser.addOption('path',
callback: (path) => {flutter_native_splash.createSplash(path)});
callback: (path) => {flutter_native_splash.createSplash(path: path)});
parser.parse(args);
}
2 changes: 1 addition & 1 deletion bin/remove.dart
Expand Up @@ -5,6 +5,6 @@ import 'package:flutter_native_splash/flutter_native_splash.dart'
void main(List<String> args) {
var parser = ArgParser();
parser.addOption('path',
callback: (path) => {flutter_native_splash.removeSplash(path)});
callback: (path) => {flutter_native_splash.removeSplash(path: path)});
parser.parse(args);
}
7 changes: 7 additions & 0 deletions example/README.md
Expand Up @@ -13,6 +13,13 @@ flutter pub get
flutter pub 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
```

The updated splash screen will now appear when you run the app.

A few resources to get you started if this is your first Flutter project:
Expand Down
28 changes: 21 additions & 7 deletions example/pubspec.lock
Expand Up @@ -8,13 +8,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.2"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0"
version: "2.6.1"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -63,7 +70,7 @@ packages:
name: cupertino_icons
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
version: "1.0.3"
fake_async:
dependency: transitive
description:
Expand All @@ -82,7 +89,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.7"
version: "1.1.9"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -122,7 +129,7 @@ packages:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.2"
version: "4.1.0"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -134,7 +141,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -169,14 +176,21 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19"
version: "0.3.0"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
universal_io:
dependency: transitive
description:
name: universal_io
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
vector_math:
dependency: transitive
description:
Expand All @@ -190,7 +204,7 @@ packages:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.2"
version: "5.1.2"
yaml:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Expand Up @@ -27,7 +27,7 @@ dependencies:

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
cupertino_icons: ^1.0.3

dev_dependencies:
flutter_test:
Expand Down
4 changes: 4 additions & 0 deletions example/red.yaml
@@ -0,0 +1,4 @@
flutter_native_splash:
color: "#ff6666"
color_dark: "#660000"
fullscreen: true
4 changes: 2 additions & 2 deletions lib/flutter_native_splash.dart
Expand Up @@ -16,7 +16,7 @@ part 'templates.dart';
part 'web.dart';

/// Create splash screens for Android and iOS
void createSplash(String? path) {
void createSplash({String? path}) {
var config = getConfig(configFile: path);
checkConfig(config);
createSplashByConfig(config);
Expand Down Expand Up @@ -83,7 +83,7 @@ void createSplashByConfig(Map<String, dynamic> config) {
}

/// Remove any splash screen by setting the default white splash
void removeSplash(String? path) {
void removeSplash({String? path}) {
print('Restoring Flutter\'s default white native splash screen...');
var config = getConfig(configFile: path);

Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
@@ -1,17 +1,17 @@
name: flutter_native_splash
description: Generates native code to customize Flutter's default white native splash screen with background color and splash image. Supports dark mode, full screen, and more.
version: 1.1.8+4
version: 1.1.9
homepage: https://github.com/jonbhanson/flutter_native_splash

environment:
sdk: '>=2.12.0 <3.0.0'

dependencies:
args: ^2.0.0
args: ^2.1.1
image: ^3.0.2
meta: ^1.3.0
path: ^1.8.0
xml: ^5.1.0
xml: ^5.1.2
yaml: ^3.1.0
universal_io: ^2.0.4

Expand Down

0 comments on commit cc2ad32

Please sign in to comment.