Skip to content

Commit

Permalink
Updated example for web.
Browse files Browse the repository at this point in the history
Removed android and ios folders.
  • Loading branch information
NikitaAmelinUnikoom committed Dec 10, 2021
1 parent c55cafd commit a6a4485
Show file tree
Hide file tree
Showing 57 changed files with 73 additions and 1,150 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.1.2

- Updated example for web

# 1.1.0+1

- Updated readme
Expand Down
67 changes: 0 additions & 67 deletions android/app/build.gradle

This file was deleted.

7 changes: 0 additions & 7 deletions android/app/src/debug/AndroidManifest.xml

This file was deleted.

33 changes: 0 additions & 33 deletions android/app/src/main/AndroidManifest.xml

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions android/app/src/main/res/drawable/launch_background.xml

This file was deleted.

Binary file removed android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file not shown.
Binary file removed android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 0 additions & 8 deletions android/app/src/main/res/values/styles.xml

This file was deleted.

7 changes: 0 additions & 7 deletions android/app/src/profile/AndroidManifest.xml

This file was deleted.

31 changes: 0 additions & 31 deletions android/build.gradle

This file was deleted.

4 changes: 0 additions & 4 deletions android/gradle.properties

This file was deleted.

6 changes: 0 additions & 6 deletions android/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

15 changes: 0 additions & 15 deletions android/settings.gradle

This file was deleted.

4 changes: 2 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 28
compileSdkVersion 31

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -40,7 +40,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.cleveroad.flutter_sliding_tutorial_example"
minSdkVersion 16
targetSdkVersion 28
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
1 change: 1 addition & 0 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:exported="true"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
Expand Down
8 changes: 4 additions & 4 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
buildscript {
ext.kotlin_version = '1.2.71'
ext.kotlin_version = '1.5.21'
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:4.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
6 changes: 3 additions & 3 deletions example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jun 23 08:50:38 CEST 2017
#Fri Dec 10 11:49:21 EET 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
zipStoreBase=GRADLE_USER_HOME
33 changes: 33 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class ExamplePage extends StatefulWidget {

class _ExamplePageState extends State<ExamplePage> {
final ValueNotifier<double> notifier = ValueNotifier(0);
final _pageCtrl = PageController();
int pageCount = 6;

@override
Expand All @@ -35,6 +36,7 @@ class _ExamplePageState extends State<ExamplePage> {
children: <Widget>[
/// [StatefulWidget] with [PageView] and [AnimatedBackgroundColor].
SlidingTutorial(
controller: _pageCtrl,
pageCount: pageCount,
notifier: notifier,
),
Expand All @@ -48,6 +50,37 @@ class _ExamplePageState extends State<ExamplePage> {
color: Colors.white,
),
),
Align(
alignment: Alignment.centerLeft,
child: IconButton(
icon: Icon(
Icons.arrow_back_ios_rounded,
color: Colors.white,
),
onPressed: () {
_pageCtrl.previousPage(
duration: Duration(milliseconds: 600),
curve: Curves.linear,
);
},
),
),
Align(
alignment: Alignment.centerRight,
child: IconButton(
icon: Icon(
Icons.arrow_back_ios_rounded,
color: Colors.white,
textDirection: TextDirection.rtl,
),
onPressed: () {
_pageCtrl.nextPage(
duration: Duration(milliseconds: 600),
curve: Curves.linear,
);
},
),
),

/// [SlidingIndicator] for [PageView] in [SlidingTutorial].
Align(
Expand Down
Loading

0 comments on commit a6a4485

Please sign in to comment.