Skip to content

Commit

Permalink
Feature/4.1.0 support web (#138)
Browse files Browse the repository at this point in the history
## 4.1.0
* Add support web
* Fix some wrong parameter at readme
* Remove hideStatusBar (should be config by main page, not by this widget)
  • Loading branch information
duytq94 committed Sep 26, 2022
1 parent bd09372 commit 5229531
Show file tree
Hide file tree
Showing 10 changed files with 202 additions and 104 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,8 @@
## 4.1.0
* Add support web
* Fix some wrong parameter at readme
* Remove hideStatusBar (should be config by main page, not by this widget)

## 4.0.0
* Restructure some parameter to make clearer
* Customizable indicator
Expand Down
28 changes: 15 additions & 13 deletions README.md
Expand Up @@ -23,7 +23,7 @@ Add to pubspec.yaml file

```sh
dependencies:
intro_slider: ^4.0.0
intro_slider: ^4.1.0
```

Import
Expand Down Expand Up @@ -152,6 +152,8 @@ class IntroScreenCustomConfigState extends State<IntroScreenCustomConfig> {
style: TextStyle(color: Colors.white),
),
backgroundNetworkImage: "https://picsum.photos/600/900",
backgroundFilterOpacity: 0.5,
backgroundFilterColor: Colors.redAccent,
onCenterItemPress: () {},
),
);
Expand Down Expand Up @@ -244,7 +246,6 @@ class IntroScreenCustomConfigState extends State<IntroScreenCustomConfig> {
// Content config
listContentConfig: listContentConfig,
backgroundColorAllTabs: Colors.grey,
hideStatusBar: true,
// Skip button
renderSkipBtn: renderSkipBtn(),
Expand Down Expand Up @@ -347,7 +348,8 @@ class IntroScreenCustomLayoutState extends State<IntroScreenCustomLayout> {
ButtonStyle myButtonStyle() {
return ButtonStyle(
shape: MaterialStateProperty.all<OutlinedBorder>(const StadiumBorder()),
backgroundColor: MaterialStateProperty.all<Color>(const Color(0x33ffcc5c)),
backgroundColor:
MaterialStateProperty.all<Color>(const Color(0x33ffcc5c)),
overlayColor: MaterialStateProperty.all<Color>(const Color(0x33ffcc5c)),
);
}
Expand All @@ -373,10 +375,12 @@ class IntroScreenCustomLayoutState extends State<IntroScreenCustomLayout> {
color: secondColor,
),
onChanged: (String? value) {},
items: ["0", "1", "2"].map<DropdownMenuItem<String>>((String value) {
items: ["0", "1", "2"]
.map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value, style: TextStyle(color: secondColor, fontSize: 20)),
child: Text(value,
style: TextStyle(color: secondColor, fontSize: 20)),
);
}).toList(),
),
Expand Down Expand Up @@ -440,7 +444,6 @@ class IntroScreenCustomLayoutState extends State<IntroScreenCustomLayout> {
// Behavior
scrollPhysics: const BouncingScrollPhysics(),
hideStatusBar: true,
onTabChangeCompleted: onTabChangeCompleted,
);
}
Expand All @@ -462,7 +465,6 @@ class IntroScreenCustomLayoutState extends State<IntroScreenCustomLayout> {
| refFuncGoToTab | `void Function(Function function)?` | Do nothing | Send the reference of change tab's function, then we can move to any tab index programmatically |
| onTabChangeCompleted | `void Function(int index)?` | Do nothing | Callback when tab change comleted, return the current tab's index |
| backgroundColorAllTabs | `Color?` | Transparent | Background color for all tabs (if backgroundColor on each tab not set) |
| hideStatusBar | `bool?` | false | Show or hide the status bar |
| <b>Skip Button</b> | | | |
| renderSkipBtn | `Widget?` | Button with white text SKIP | Render your own widget SKIP button |
| skipButtonStyle | `ButtonStyle?` | ButtonStyle() | Style for SKIP button |
Expand Down Expand Up @@ -536,12 +538,12 @@ class IntroScreenCustomLayoutState extends State<IntroScreenCustomLayout> {
| directionColorBegin | `AlignmentGeometry?` | Alignment.topLeft | Direction color begin |
| directionColorEnd | `AlignmentGeometry?` | Alignment.bottomRight | Direction color end |
| <b>Background Image</b> | | | |
| backgroundImage | `String?` | null | Background tab image |
| backgroundNetworkImage | `String?` | null | Background tab image (from network) |
| backgroundImageFit | `BoxFit?` | BoxFit.cover | Background tab image fit |
| backgroundOpacity | `double?` | 0.5 | Background tab image filter opacity |
| backgroundOpacityColor | `Color?` | Colors.black | Background tab image filter color |
| backgroundBlendMode | `BlendMode?` | BlendMode.darken | Background tab image filter blend mode |
| backgroundImage | `String?` | null | Set image for background (if set, will ignore all parameter at `Background Color` above) |
| backgroundNetworkImage | `String?` | null | Set image (from network) for background |
| backgroundImageFit | `BoxFit?` | BoxFit.cover | Background image fit |
| backgroundFilterColor | `Color?` | Colors.black | A color filter to apply to the image background before painting it |
| backgroundFilterOpacity | `double?` | 0.5 | Opacity for `backgroundFilterColor` |
| backgroundBlendMode | `BlendMode?` | BlendMode.darken | Background blend mode |
| <b>Others</b> | | | |
| verticalScrollbarBehavior | `enum ScrollbarBehavior?` | ScrollbarBehavior.HIDE | Allow to specify how the vertical scrollbar should behave <br>(scroll enable when content length is greater than screen length) |

Expand Down
3 changes: 2 additions & 1 deletion example/lib/intro_screen_custom_config.dart
Expand Up @@ -51,6 +51,8 @@ class IntroScreenCustomConfigState extends State<IntroScreenCustomConfig> {
style: TextStyle(color: Colors.white),
),
backgroundNetworkImage: "https://picsum.photos/600/900",
backgroundFilterOpacity: 0.5,
backgroundFilterColor: Colors.redAccent,
onCenterItemPress: () {},
),
);
Expand Down Expand Up @@ -144,7 +146,6 @@ class IntroScreenCustomConfigState extends State<IntroScreenCustomConfig> {
// Content config
listContentConfig: listContentConfig,
backgroundColorAllTabs: Colors.grey,
hideStatusBar: true,

// Skip button
renderSkipBtn: renderSkipBtn(),
Expand Down
1 change: 0 additions & 1 deletion example/lib/intro_screen_custom_layout.dart
Expand Up @@ -146,7 +146,6 @@ class IntroScreenCustomLayoutState extends State<IntroScreenCustomLayout> {

// Behavior
scrollPhysics: const BouncingScrollPhysics(),
hideStatusBar: true,
onTabChangeCompleted: onTabChangeCompleted,
);
}
Expand Down
23 changes: 22 additions & 1 deletion example/pubspec.lock
Expand Up @@ -43,6 +43,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.16.0"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.2"
cupertino_icons:
dependency: "direct main"
description:
Expand Down Expand Up @@ -80,7 +87,7 @@ packages:
path: ".."
relative: true
source: path
version: "3.0.10"
version: "4.0.0"
lints:
dependency: transitive
description:
Expand Down Expand Up @@ -163,6 +170,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.9"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
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 Down

0 comments on commit 5229531

Please sign in to comment.