Skip to content

Commit

Permalink
fix navigate example
Browse files Browse the repository at this point in the history
  • Loading branch information
duytq94 committed Dec 15, 2018
1 parent f0c3caa commit f7c48e1
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 23 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## 1.0.9

* Fix navigate example

## 1.0.8

* Change color options to be instances of `Color` instead `int`
* Change color options to be instances of `Color` instead `int`

## 1.0.7

Expand Down
41 changes: 26 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Add to pubspec.yaml file

```sh
dependencies:
intro_slider: ^1.0.8
intro_slider: ^1.0.9
```

Import
Expand All @@ -26,7 +26,7 @@ import 'package:intro_slider/intro_slider.dart';
![default config image](screenshots/default.png)

```dart
class _MyAppState extends State<MyApp> {
class MySplashScreenState extends State<MySplashScreen> {
List<Slide> slides = new List();
@override
Expand All @@ -38,15 +38,15 @@ class _MyAppState extends State<MyApp> {
title: "ERASER",
description: "Allow miles wound place the leave had. To sitting subject no improve studied limited",
pathImage: "images/photo_eraser.png",
backgroundColor: 0xfff5a623,
backgroundColor: Color(0xfff5a623),
),
);
slides.add(
new Slide(
title: "PENCIL",
description: "Ye indulgence unreserved connection alteration appearance",
pathImage: "images/photo_pencil.png",
backgroundColor: 0xff203152,
backgroundColor: Color(0xff203152),
),
);
slides.add(
Expand All @@ -55,7 +55,7 @@ class _MyAppState extends State<MyApp> {
description:
"Much evil soon high in hope do view. Out may few northward believing attempted. Yet timed being songs marry one defer men our. Although finished blessing do of",
pathImage: "images/photo_ruler.png",
backgroundColor: 0xff9932CC,
backgroundColor: Color(0xff9932CC),
),
);
}
Expand Down Expand Up @@ -84,7 +84,7 @@ class _MyAppState extends State<MyApp> {
![custom config image](screenshots/custom.png)

```dart
class _MyAppState extends State<MyApp> {
class MySplashScreenState extends State<MySplashScreen> {
List<Slide> slides = new List();
@override
Expand All @@ -100,7 +100,11 @@ class _MyAppState extends State<MyApp> {
styleDescription:
TextStyle(color: Color(0xffD02090), fontSize: 20.0, fontStyle: FontStyle.italic, fontFamily: 'Raleway'),
pathImage: "images/photo_school.png",
backgroundColor: 0xFFFFDEAD,
colorBegin: Color(0xffFFDAB9),
colorEnd: Color(0xff40E0D0),
directionColorBegin: Alignment.topLeft,
directionColorEnd: Alignment.bottomRight,
onImagePress: () {},
),
);
slides.add(
Expand All @@ -112,7 +116,10 @@ class _MyAppState extends State<MyApp> {
styleDescription:
TextStyle(color: Color(0xffD02090), fontSize: 20.0, fontStyle: FontStyle.italic, fontFamily: 'Raleway'),
pathImage: "images/photo_museum.png",
backgroundColor: 0xffFFFACD,
colorBegin: Color(0xffFFFACD),
colorEnd: Color(0xffFF6347),
directionColorBegin: Alignment.topRight,
directionColorEnd: Alignment.bottomLeft,
),
);
slides.add(
Expand All @@ -125,7 +132,11 @@ class _MyAppState extends State<MyApp> {
styleDescription:
TextStyle(color: Color(0xffD02090), fontSize: 20.0, fontStyle: FontStyle.italic, fontFamily: 'Raleway'),
pathImage: "images/photo_coffee_shop.png",
backgroundColor: 0xffFFF8DC,
colorBegin: Color(0xffFFA500),
colorEnd: Color(0xff7FFFD4),
directionColorBegin: Alignment.topCenter,
directionColorEnd: Alignment.bottomCenter,
maxLineTextDescription: 3,
),
);
}
Expand Down Expand Up @@ -169,19 +180,19 @@ class _MyAppState extends State<MyApp> {
// Skip button
renderSkipBtn: this.renderSkipBtn(),
onSkipPress: this.onSkipPress,
colorSkipBtn: 0x33000000,
highlightColorSkipBtn: 0xff000000,
colorSkipBtn: Color(0x33000000),
highlightColorSkipBtn: Color(0xff000000),
// Next, Done button
onDonePress: this.onDonePress,
renderNextBtn: this.renderNextBtn(),
renderDoneBtn: this.renderDoneBtn(),
colorDoneBtn: 0x33000000,
highlightColorDoneBtn: 0xff000000,
colorDoneBtn: Color(0x33000000),
highlightColorDoneBtn: Color(0xff000000),
// Dot indicator
colorDot: 0x33D02090,
colorActiveDot: 0xffD02090,
colorDot: Color(0x33D02090),
colorActiveDot: Color(0xffD02090),
sizeDot: 13.0,
);
}
Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.1.2'
}
}

Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
20 changes: 16 additions & 4 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,25 @@ import 'package:intro_slider/intro_slider.dart';

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

class MyApp extends StatefulWidget {
class MyApp extends StatelessWidget {
@override
_MyAppState createState() => new _MyAppState();
Widget build(BuildContext context) {
return MaterialApp(
home: MySplashScreen(),
debugShowCheckedModeBanner: false,
);
}
}

class MySplashScreen extends StatefulWidget {
MySplashScreen({Key key}) : super(key: key);

@override
MySplashScreenState createState() => new MySplashScreenState();
}

// Custom config
class _MyAppState extends State<MyApp> {
class MySplashScreenState extends State<MySplashScreen> {
List<Slide> slides = new List();

@override
Expand Down Expand Up @@ -124,7 +136,7 @@ class _MyAppState extends State<MyApp> {
}

//Default config
//class _MyAppState extends State<MyApp> {
//class MySplashScreenState extends State<MySplashScreen> {
// List<Slide> slides = new List();
//
// @override
Expand Down
9 changes: 9 additions & 0 deletions local.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Wed Dec 12 22:41:28 ICT 2018
ndk.dir=C\:\\Users\\tranq\\AppData\\Local\\Android\\Sdk\\ndk-bundle
sdk.dir=C\:\\Users\\tranq\\AppData\\Local\\Android\\Sdk
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A plugin to help you make intro slider screen to show the major fea
authors:
- Duy Tran <tranquangduy7994@gmail.com>
homepage: https://github.com/duytq94/flutter-intro-slider
version: 1.0.8
version: 1.0.9

dependencies:
flutter:
Expand Down

0 comments on commit f7c48e1

Please sign in to comment.