├── example
├── ios
│ ├── Runner
│ │ ├── Runner-Bridging-Header.h
│ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── 100.png
│ │ │ │ ├── 114.png
│ │ │ │ ├── 120.png
│ │ │ │ ├── 128.png
│ │ │ │ ├── 144.png
│ │ │ │ ├── 152.png
│ │ │ │ ├── 16.png
│ │ │ │ ├── 167.png
│ │ │ │ ├── 172.png
│ │ │ │ ├── 180.png
│ │ │ │ ├── 196.png
│ │ │ │ ├── 20.png
│ │ │ │ ├── 216.png
│ │ │ │ ├── 256.png
│ │ │ │ ├── 29.png
│ │ │ │ ├── 32.png
│ │ │ │ ├── 40.png
│ │ │ │ ├── 48.png
│ │ │ │ ├── 50.png
│ │ │ │ ├── 512.png
│ │ │ │ ├── 55.png
│ │ │ │ ├── 57.png
│ │ │ │ ├── 58.png
│ │ │ │ ├── 60.png
│ │ │ │ ├── 64.png
│ │ │ │ ├── 72.png
│ │ │ │ ├── 76.png
│ │ │ │ ├── 80.png
│ │ │ │ ├── 87.png
│ │ │ │ ├── 88.png
│ │ │ │ ├── 1024.png
│ │ │ │ └── Contents.json
│ │ │ └── LaunchImage.imageset
│ │ │ │ ├── LaunchImage.png
│ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ ├── README.md
│ │ │ │ └── Contents.json
│ │ ├── AppDelegate.swift
│ │ ├── Base.lproj
│ │ │ ├── Main.storyboard
│ │ │ └── LaunchScreen.storyboard
│ │ └── Info.plist
│ ├── Flutter
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── AppFrameworkInfo.plist
│ ├── Runner.xcodeproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── xcshareddata
│ │ │ └── xcschemes
│ │ │ │ └── Runner.xcscheme
│ │ └── project.pbxproj
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Podfile.lock
│ ├── .gitignore
│ └── Podfile
├── android
│ ├── gradle.properties
│ ├── app
│ │ ├── src
│ │ │ ├── main
│ │ │ │ ├── res
│ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── drawable
│ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ ├── drawable-v21
│ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ ├── values
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ └── values-night
│ │ │ │ │ │ └── styles.xml
│ │ │ │ ├── kotlin
│ │ │ │ │ └── io
│ │ │ │ │ │ └── alexmelnyk
│ │ │ │ │ │ └── example
│ │ │ │ │ │ └── MainActivity.kt
│ │ │ │ └── AndroidManifest.xml
│ │ │ ├── debug
│ │ │ │ └── AndroidManifest.xml
│ │ │ └── profile
│ │ │ │ └── AndroidManifest.xml
│ │ └── build.gradle
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ ├── .gitignore
│ ├── settings.gradle
│ └── build.gradle
├── assets
│ └── images
│ │ ├── day_sky.png
│ │ └── night_sky.jpg
├── pubspec.yaml
├── README.md
├── .gitignore
├── .metadata
├── analysis_options.yaml
├── pubspec.lock
└── lib
│ └── main.dart
├── .gitignore
├── APP_ICON.png
├── PREVIEW_DARK.png
├── PREVIEW_LIGHT.png
├── SWITCH_PREVIEW.gif
├── .metadata
├── .github
└── workflows
│ └── main.yml
├── pubspec.yaml
├── flutter_advanced_switch.iml
├── LICENSE
├── CHANGELOG.md
├── pubspec.lock
├── README.md
└── lib
└── flutter_advanced_switch.dart
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 | /.idea/
9 |
--------------------------------------------------------------------------------
/APP_ICON.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/APP_ICON.png
--------------------------------------------------------------------------------
/PREVIEW_DARK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/PREVIEW_DARK.png
--------------------------------------------------------------------------------
/PREVIEW_LIGHT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/PREVIEW_LIGHT.png
--------------------------------------------------------------------------------
/SWITCH_PREVIEW.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/SWITCH_PREVIEW.gif
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/example/assets/images/day_sky.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/assets/images/day_sky.png
--------------------------------------------------------------------------------
/example/assets/images/night_sky.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/assets/images/night_sky.jpg
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/128.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/16.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/172.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/172.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/196.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/196.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/216.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/216.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/256.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/32.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/48.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/512.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/55.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/55.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/64.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/88.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/88.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/io/alexmelnyk/example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package io.alexmelnyk.example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alex-melnyk/flutter_advanced_switch/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: bbfbf1770cca2da7c82e887e4e4af910034800b6
8 | channel: stable
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Flutter (1.0.0)
3 |
4 | DEPENDENCIES:
5 | - Flutter (from `Flutter`)
6 |
7 | EXTERNAL SOURCES:
8 | Flutter:
9 | :path: Flutter
10 |
11 | SPEC CHECKSUMS:
12 | Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
13 |
14 | PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
15 |
16 | COCOAPODS: 1.11.0
17 |
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_switcher_example
2 | description: Demonstrates how to use the flutter_switcher plugin.
3 | publish_to: 'none'
4 |
5 | environment:
6 | sdk: ">=2.12.0 <4.0.0"
7 |
8 | dependencies:
9 | flutter:
10 | sdk: flutter
11 |
12 | flutter_advanced_switch:
13 | path: ../
14 |
15 | flutter:
16 | uses-material-design: true
17 |
18 | assets:
19 | - assets/images/
20 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: Publish plugin
2 |
3 | on:
4 | release:
5 | types: [published]
6 |
7 | jobs:
8 | publish:
9 | runs-on: ubuntu-latest
10 |
11 | steps:
12 | - name: Checkout
13 | uses: actions/checkout@v2
14 | - name: Publish
15 | uses: sakebook/actions-flutter-pub-publisher@v1.3.1
16 | with:
17 | credential: ${{ secrets.CREDENTIAL_JSON }}
18 | flutter_package: true
19 | skip_test: true
20 | dry_run: false
21 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_advanced_switch
2 | description: An advanced switch control provides a rich API for widget customization that opens a new look and feel in your app.
3 | version: 3.1.0
4 | homepage: https://github.com/alex-melnyk/flutter_advanced_switch
5 | repository: https://github.com/alex-melnyk/flutter_advanced_switch
6 | issue_tracker: https://github.com/alex-melnyk/flutter_advanced_switch/issues
7 | documentation: https://github.com/alex-melnyk/flutter_advanced_switch/blob/master/README.md
8 |
9 | environment:
10 | sdk: '>=2.12.0 <4.0.0'
11 |
12 | dependencies:
13 | flutter:
14 | sdk: flutter
15 |
16 | flutter:
17 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # flutter_switcher_example
2 |
3 | Demonstrates how to use the flutter_switcher plugin.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.2.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | mavenCentral()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | tasks.register("clean", Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Exceptions to above rules.
44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
45 |
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 11.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled.
5 |
6 | version:
7 | revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
17 | base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
18 | - platform: android
19 | create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
20 | base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
21 |
22 | # User provided section
23 |
24 | # List of Local paths (relative to this file) that should be
25 | # ignored by the migrate tool.
26 | #
27 | # Files that are not part of the templates will be ignored by default.
28 | unmanaged_files:
29 | - 'lib/main.dart'
30 | - 'ios/Runner.xcodeproj/project.pbxproj'
31 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/flutter_advanced_switch.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2021 Oleksandr Melnyk
2 |
3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4 |
5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6 |
7 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8 |
9 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10 |
11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | platform :ios, '11.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | end
36 |
37 | post_install do |installer|
38 | installer.pods_project.targets.each do |target|
39 | flutter_additional_ios_build_settings(target)
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 3.1.1
2 |
3 | * Documentation updated.
4 | * Removed unnecessary dependencies.
5 |
6 | ## 3.1.0
7 |
8 | * Implemented second way to handle and change the value of the switch.
9 | * Properties `initialValue` and `onChanged` were added.
10 | * Prevent widget enabled when `controller` and `onChanged` is null.
11 |
12 | ## 3.0.1
13 |
14 | * BoxDecoration borderRadius replaced with ClipRRect
15 |
16 | ## 3.0.0+1
17 |
18 | * Documentation updated.
19 |
20 | ## 3.0.0
21 |
22 | * Custom controller changed to ValueNotifier.
23 | * Reload animation on widget update.
24 |
25 | ## 2.1.0
26 |
27 | * Change thumb with a custom widget support provided.
28 |
29 | ## 2.0.2+2
30 |
31 | * Pointing cursor added for web.
32 |
33 | ## 2.0.2+1
34 |
35 | * LICENSE CHANGED.
36 |
37 | ## 2.0.2
38 |
39 | * Disabled opacity property added.
40 |
41 | ## 2.0.1
42 |
43 | * Enabled/disabled state property.
44 | * Documentation improved.
45 |
46 | ## 2.0.0
47 |
48 | * Null Safety implemented.
49 |
50 | ## 1.0.0+1
51 |
52 | * Code format fixed.
53 |
54 | ## 1.0.0
55 |
56 | * State management changed to controller.
57 |
58 | ## 0.0.9+4
59 |
60 | * License changed to MIT.
61 |
62 | ## 0.0.9+3
63 |
64 | * Changelog information provided.
65 |
66 | ## 0.0.9+2
67 |
68 | * Code formatting fixed.
69 | * Documentation url fixed.
70 |
71 | ## 0.0.8
72 |
73 | * Documentation improved.
74 |
75 | ## 0.0.7
76 |
77 | * Adding active/inactive widgets feature implemented.
78 |
79 | ## 0.0.6
80 |
81 | * Adding active/inactive background images feature implemented.
82 |
--------------------------------------------------------------------------------
/example/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 |
28 | # Additional information about this file can be found at
29 | # https://dart.dev/guides/language/analysis-options
30 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | characters:
5 | dependency: transitive
6 | description:
7 | name: characters
8 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "1.3.0"
12 | collection:
13 | dependency: transitive
14 | description:
15 | name: collection
16 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "1.18.0"
20 | flutter:
21 | dependency: "direct main"
22 | description: flutter
23 | source: sdk
24 | version: "0.0.0"
25 | material_color_utilities:
26 | dependency: transitive
27 | description:
28 | name: material_color_utilities
29 | sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
30 | url: "https://pub.dev"
31 | source: hosted
32 | version: "0.8.0"
33 | meta:
34 | dependency: transitive
35 | description:
36 | name: meta
37 | sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
38 | url: "https://pub.dev"
39 | source: hosted
40 | version: "1.11.0"
41 | sky_engine:
42 | dependency: transitive
43 | description: flutter
44 | source: sdk
45 | version: "0.0.99"
46 | vector_math:
47 | dependency: transitive
48 | description:
49 | name: vector_math
50 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
51 | url: "https://pub.dev"
52 | source: hosted
53 | version: "2.1.4"
54 | sdks:
55 | dart: ">=3.2.0-0 <4.0.0"
56 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
15 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | flutter_switcher_example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 | CADisableMinimumFrameDurationOnPhone
45 |
46 | UIApplicationSupportsIndirectInputEvents
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/example/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | characters:
5 | dependency: transitive
6 | description:
7 | name: characters
8 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "1.3.0"
12 | collection:
13 | dependency: transitive
14 | description:
15 | name: collection
16 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "1.18.0"
20 | flutter:
21 | dependency: "direct main"
22 | description: flutter
23 | source: sdk
24 | version: "0.0.0"
25 | flutter_advanced_switch:
26 | dependency: "direct main"
27 | description:
28 | path: ".."
29 | relative: true
30 | source: path
31 | version: "3.1.0"
32 | material_color_utilities:
33 | dependency: transitive
34 | description:
35 | name: material_color_utilities
36 | sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
37 | url: "https://pub.dev"
38 | source: hosted
39 | version: "0.8.0"
40 | meta:
41 | dependency: transitive
42 | description:
43 | name: meta
44 | sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
45 | url: "https://pub.dev"
46 | source: hosted
47 | version: "1.11.0"
48 | sky_engine:
49 | dependency: transitive
50 | description: flutter
51 | source: sdk
52 | version: "0.0.99"
53 | vector_math:
54 | dependency: transitive
55 | description:
56 | name: vector_math
57 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
58 | url: "https://pub.dev"
59 | source: hosted
60 | version: "2.1.4"
61 | sdks:
62 | dart: ">=3.2.0-0 <4.0.0"
63 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion flutter.compileSdkVersion
30 | ndkVersion flutter.ndkVersion
31 |
32 | compileOptions {
33 | sourceCompatibility JavaVersion.VERSION_1_8
34 | targetCompatibility JavaVersion.VERSION_1_8
35 | }
36 |
37 | kotlinOptions {
38 | jvmTarget = '1.8'
39 | }
40 |
41 | sourceSets {
42 | main.java.srcDirs += 'src/main/kotlin'
43 | }
44 |
45 | defaultConfig {
46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
47 | applicationId "io.alexmelnyk.example"
48 | // You can update the following values to match your application needs.
49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
50 | minSdkVersion flutter.minSdkVersion
51 | targetSdkVersion flutter.targetSdkVersion
52 | versionCode flutterVersionCode.toInteger()
53 | versionName flutterVersionName
54 | }
55 |
56 | buildTypes {
57 | release {
58 | // TODO: Add your own signing config for the release build.
59 | // Signing with the debug keys for now, so `flutter run --release` works.
60 | signingConfig signingConfigs.debug
61 | }
62 | }
63 | }
64 |
65 | flutter {
66 | source '../..'
67 | }
68 |
69 | dependencies {
70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
71 | }
72 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # flutter_advanced_switch
2 | An advanced switch widget, that can be fully customized with size, text, color, radius of corners.
3 |
4 | 
5 |
6 | | Switch Light | Switch Dark |
7 | |:-:|:-:|
8 | |  |  |
9 |
10 | ## Getting Started
11 | In the `pubspec.yaml` of your flutter project, add the following dependency:
12 |
13 | ```yaml
14 | dependencies:
15 | ...
16 | flutter_advanced_switch:
17 | ```
18 |
19 | Import in your project:
20 |
21 | ```dart
22 | import 'package:flutter_advanced_switch/flutter_advanced_switch.dart';
23 | ```
24 |
25 | ## Examples
26 |
27 | ### How to use
28 |
29 | ```dart
30 | // ...
31 | // 1. Create a controller in the state of the StatefulWidget
32 | final _controller = ValueNotifier(false);
33 |
34 | // 2. In case, you want to call setState on switch changes.
35 | // 2.1. Add event listener, for example in the initState() method.
36 | // ...
37 | bool _checked = false;
38 |
39 | // ...
40 | @override
41 | void initState() {
42 | super.initState();
43 |
44 | _controller.addListener(() {
45 | setState(() {
46 | if (_controller00.value) {
47 | _checked = true;
48 | } else {
49 | _checked = false;
50 | }
51 | });
52 | });
53 | }
54 |
55 | // 3. Add AdvancedSwitch to the build method.
56 | // ...
57 | AdvancedSwitch(
58 | controller: _controller,
59 | ),
60 | // ...
61 | ```
62 |
63 | Regular Switch
64 |
65 | ```dart
66 | // ...
67 | final _controller = ValueNotifier(false);
68 | // ...
69 | AdvancedSwitch(
70 | controller: _controller,
71 | )
72 | // ...
73 | ```
74 |
75 | Customized Switch
76 |
77 | ```dart
78 | // ...
79 | final _controller = ValueNotifier(false);
80 | // ...
81 | AdvancedSwitch(
82 | controller: _controller,
83 | activeColor: Colors.green,
84 | inactiveColor: Colors.grey,
85 | activeChild: Text('ON'),
86 | inactiveChild: Text('OFF'),
87 | activeImage: AssetImage('assets/images/on.png'),
88 | inactiveImage: AssetImage('assets/images/off.png'),
89 | borderRadius: BorderRadius.all(const Radius.circular(15)),
90 | width: 50.0,
91 | height: 30.0,
92 | enabled: true,
93 | disabledOpacity: 0.5,
94 | ),
95 | // ...
96 | ```
97 |
98 | Custom thumb
99 |
100 | ```dart
101 | // ...
102 | final _controller = ValueNotifier(false);
103 | // ...
104 | AdvancedSwitch(
105 | controller: _controller,
106 | thumb: ValueListenableBuilder(
107 | valueListenable: _controller,
108 | builder: (_, value, __) {
109 | return Icon(value
110 | ? Icons.lightbulb
111 | : Icons.lightbulb_outline);
112 | },
113 | ),
114 | ),
115 | // ...
116 | ```
117 |
118 | ## AdvancedSwitch Parameters
119 | |Parameter| Description | Type | Default |
120 | |:--------|:----------------------------------------------------|:----------------------|:--------------------|
121 | |`controller`| Determines current state. | *ValueNotifier* ||
122 | |`activeColor`| Determines background color for the active state. | *Color* | Colors.green |
123 | |`inactiveColor`| Determines background color for the inactive state. | *Color* | Colors.grey |
124 | |`activeChild`| Determines label for the active state. | *Widget* ||
125 | |`inactiveChild`| Determines label for the inactive state. | *Widget* ||
126 | |`activeImage`| Determines background image for the active state. | *ImageProvider* ||
127 | |`inactiveImage`| Determines background image for the inactive state. | *ImageProvider* ||
128 | |`borderRadius`| Determines border radius. | *BorderRadius* | Radius.circular(15) |
129 | |`width`| Determines width. | *Double* | 50.0 |
130 | |`height`| Determines height. | *Double* | 30.0 |
131 | |`enabled`| Determines if widget is enabled. | *bool* | true |
132 | |`disabledOpacity`| Determines opacity of disabled control. | *double* | 0.5 |
133 | | `thumb` | Custom thumb widget | *Widget* ||
134 | | `initialValue` | Initial value | *bool* | false |
135 | | `onChanged` | Changed callback | *ValueChanged* ||
136 |
137 | # Demo
138 | 
139 |
--------------------------------------------------------------------------------
/lib/flutter_advanced_switch.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/widgets.dart';
2 |
3 | class AdvancedSwitch extends StatefulWidget {
4 | const AdvancedSwitch({
5 | Key? key,
6 | this.controller,
7 | this.activeColor = const Color(0xFF4CAF50),
8 | this.inactiveColor = const Color(0xFF9E9E9E),
9 | this.activeChild,
10 | this.inactiveChild,
11 | this.activeImage,
12 | this.inactiveImage,
13 | this.borderRadius = const BorderRadius.all(const Radius.circular(15)),
14 | this.width = 50.0,
15 | this.height = 30.0,
16 | this.enabled = true,
17 | this.disabledOpacity = 0.5,
18 | this.thumb,
19 | this.initialValue = false,
20 | this.onChanged,
21 | }) : super(key: key);
22 |
23 | /// Determines if widget is enabled
24 | final bool enabled;
25 |
26 | /// Determines current state.
27 | final ValueNotifier? controller;
28 |
29 | /// Determines background color for the active state.
30 | final Color activeColor;
31 |
32 | /// Determines background color for the inactive state.
33 | final Color inactiveColor;
34 |
35 | /// Determines label for the active state.
36 | final Widget? activeChild;
37 |
38 | /// Determines label for the inactive state.
39 | final Widget? inactiveChild;
40 |
41 | /// Determines background image for the active state.
42 | final ImageProvider? activeImage;
43 |
44 | /// Determines background image for the inactive state.
45 | final ImageProvider? inactiveImage;
46 |
47 | /// Determines border radius.
48 | final BorderRadius borderRadius;
49 |
50 | /// Determines width.
51 | final double width;
52 |
53 | /// Determines height.
54 | final double height;
55 |
56 | /// Determines opacity of disabled control.
57 | final double disabledOpacity;
58 |
59 | /// Thumb widget.
60 | final Widget? thumb;
61 |
62 | /// The initial value.
63 | final bool initialValue;
64 |
65 | /// Called when the value of the switch should change.
66 | final ValueChanged? onChanged;
67 |
68 | @override
69 | _AdvancedSwitchState createState() => _AdvancedSwitchState();
70 | }
71 |
72 | class _AdvancedSwitchState extends State
73 | with SingleTickerProviderStateMixin {
74 | static const _duration = Duration(milliseconds: 250);
75 | late ValueNotifier _controller;
76 | late AnimationController _animationController;
77 | late Animation _slideAnimation;
78 | late Animation _colorAnimation;
79 | late double _thumbSize;
80 |
81 | @override
82 | void initState() {
83 | super.initState();
84 |
85 | _controller = ValueNotifier(widget.initialValue);
86 |
87 | _valueController.addListener(_handleControllerValueChanged);
88 |
89 | _animationController = AnimationController(
90 | vsync: this,
91 | duration: _duration,
92 | value: _controller.value ? 1.0 : 0.0,
93 | );
94 |
95 | _initAnimation();
96 | }
97 |
98 | @override
99 | void didUpdateWidget(covariant AdvancedSwitch oldWidget) {
100 | super.didUpdateWidget(oldWidget);
101 |
102 | oldWidget.controller?.removeListener(_handleControllerValueChanged);
103 | _valueController
104 | ..removeListener(_handleControllerValueChanged)
105 | ..addListener(_handleControllerValueChanged);
106 |
107 | if (oldWidget.initialValue != widget.initialValue) {
108 | _valueController.value = widget.initialValue;
109 | }
110 |
111 | _initAnimation();
112 | }
113 |
114 | @override
115 | Widget build(BuildContext context) {
116 | final labelSize = widget.width - _thumbSize;
117 | final containerSize = labelSize * 2 + _thumbSize;
118 |
119 | return MouseRegion(
120 | cursor: SystemMouseCursors.click,
121 | child: GestureDetector(
122 | onTap: _handlePressed,
123 | child: Opacity(
124 | opacity: _isEnabled ? 1 : widget.disabledOpacity,
125 | child: AnimatedBuilder(
126 | animation: _animationController,
127 | builder: (_, child) {
128 | return ClipRRect(
129 | borderRadius: widget.borderRadius,
130 | clipBehavior: Clip.antiAlias,
131 | child: Container(
132 | width: widget.width,
133 | height: widget.height,
134 | color: _colorAnimation.value,
135 | child: child,
136 | ),
137 | );
138 | },
139 | child: Stack(
140 | children: [
141 | if (widget.activeImage != null || widget.inactiveImage != null)
142 | ValueListenableBuilder(
143 | valueListenable: _valueController,
144 | builder: (_, value, ___) {
145 | print('value: $value');
146 |
147 | return AnimatedCrossFade(
148 | crossFadeState: value
149 | ? CrossFadeState.showSecond
150 | : CrossFadeState.showFirst,
151 | duration: _duration,
152 | firstChild: Image(
153 | width: widget.width,
154 | height: widget.height,
155 | image: widget.inactiveImage ?? widget.activeImage!,
156 | fit: BoxFit.cover,
157 | ),
158 | secondChild: Image(
159 | width: widget.width,
160 | height: widget.height,
161 | image: widget.activeImage ?? widget.inactiveImage!,
162 | fit: BoxFit.cover,
163 | ),
164 | );
165 | },
166 | ),
167 | AnimatedBuilder(
168 | animation: _animationController,
169 | builder: (context, child) {
170 | return Transform.translate(
171 | offset: _slideAnimation.value,
172 | child: child,
173 | );
174 | },
175 | child: OverflowBox(
176 | minWidth: containerSize,
177 | maxWidth: containerSize,
178 | minHeight: widget.height,
179 | maxHeight: widget.height,
180 | child: Row(
181 | mainAxisSize: MainAxisSize.min,
182 | children: [
183 | IconTheme(
184 | data: const IconThemeData(
185 | color: Color(0xFFFFFFFF),
186 | size: 20,
187 | ),
188 | child: DefaultTextStyle(
189 | style: const TextStyle(
190 | color: Color(0xFFFFFFFF),
191 | fontWeight: FontWeight.w500,
192 | fontSize: 12,
193 | ),
194 | child: Container(
195 | width: labelSize,
196 | height: widget.height,
197 | alignment: Alignment.center,
198 | child: widget.activeChild,
199 | ),
200 | ),
201 | ),
202 | Container(
203 | margin: const EdgeInsets.all(2),
204 | width: _thumbSize - 4,
205 | height: _thumbSize - 4,
206 | child: widget.thumb ??
207 | Container(
208 | decoration: BoxDecoration(
209 | color: const Color(0xFFFFFFFF),
210 | borderRadius: widget.borderRadius
211 | .subtract(BorderRadius.circular(1)),
212 | boxShadow: const [
213 | BoxShadow(
214 | color: Color(0x42000000),
215 | blurRadius: 8,
216 | ),
217 | ],
218 | ),
219 | ),
220 | ),
221 | IconTheme(
222 | data: const IconThemeData(
223 | color: Color(0xFFFFFFFF),
224 | size: 20,
225 | ),
226 | child: DefaultTextStyle(
227 | style: const TextStyle(
228 | color: Color(0xFFFFFFFF),
229 | fontWeight: FontWeight.w500,
230 | fontSize: 12,
231 | ),
232 | child: Container(
233 | width: labelSize,
234 | height: widget.height,
235 | alignment: Alignment.center,
236 | child: widget.inactiveChild,
237 | ),
238 | ),
239 | ),
240 | ],
241 | ),
242 | ),
243 | ),
244 | ],
245 | ),
246 | ),
247 | ),
248 | ),
249 | );
250 | }
251 |
252 | ValueNotifier get _valueController => widget.controller ?? _controller;
253 |
254 | bool get _isEnabled =>
255 | widget.enabled && (widget.controller != null || widget.onChanged != null);
256 |
257 | void _initAnimation() {
258 | _thumbSize = widget.height;
259 | final offset = widget.width / 2 - _thumbSize / 2;
260 |
261 | final animation = CurvedAnimation(
262 | parent: _animationController,
263 | curve: Curves.easeInOut,
264 | );
265 |
266 | _slideAnimation = Tween(
267 | begin: Offset(-offset, 0),
268 | end: Offset(offset, 0),
269 | ).animate(animation);
270 |
271 | _colorAnimation = ColorTween(
272 | begin: widget.inactiveColor,
273 | end: widget.activeColor,
274 | ).animate(animation);
275 | }
276 |
277 | void _handleControllerValueChanged() {
278 | final nextValue = _valueController.value;
279 | widget.onChanged?.call(nextValue);
280 |
281 | if (nextValue) {
282 | _animationController.forward();
283 | } else {
284 | _animationController.reverse();
285 | }
286 | }
287 |
288 | void _handlePressed() {
289 | if (!_isEnabled) {
290 | return;
291 | }
292 |
293 | _valueController.value = !_valueController.value;
294 | }
295 |
296 | @override
297 | void dispose() {
298 | _valueController.removeListener(_handleControllerValueChanged);
299 |
300 | _controller..dispose();
301 |
302 | _animationController.dispose();
303 |
304 | super.dispose();
305 | }
306 | }
307 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_advanced_switch/flutter_advanced_switch.dart';
3 |
4 | void main() {
5 | runApp(MyApp());
6 | }
7 |
8 | class MyApp extends StatefulWidget {
9 | @override
10 | _MyAppState createState() => _MyAppState();
11 | }
12 |
13 | class _MyAppState extends State {
14 | final _controller00 = ValueNotifier(false);
15 | final _controller01 = ValueNotifier(false);
16 | final _controller02 = ValueNotifier(false);
17 | final _controller03 = ValueNotifier(false);
18 | final _controller04 = ValueNotifier(false);
19 | final _controller05 = ValueNotifier(false);
20 | final _controller06 = ValueNotifier(false);
21 | final _controller07 = ValueNotifier(false);
22 | final _controller08 = ValueNotifier(false);
23 | final _controller09 = ValueNotifier(false);
24 | final _controller10 = ValueNotifier(false);
25 | final _controller11 = ValueNotifier(false);
26 | final _controller12 = ValueNotifier(false);
27 | final _controller13 = ValueNotifier(false);
28 | final _controller14 = ValueNotifier(false);
29 | final _controller15 = ValueNotifier(false);
30 |
31 | bool _enabled = false;
32 | bool _themeDark = false;
33 | bool _initialValue = false;
34 |
35 | @override
36 | void initState() {
37 | super.initState();
38 |
39 | _controller00.addListener(() {
40 | setState(() {
41 | if (_controller00.value) {
42 | _themeDark = true;
43 | } else {
44 | _themeDark = false;
45 | }
46 | });
47 | });
48 | }
49 |
50 | @override
51 | Widget build(BuildContext context) {
52 | return MaterialApp(
53 | theme: _themeDark ? ThemeData.dark() : ThemeData.light(),
54 | home: Scaffold(
55 | appBar: AppBar(
56 | title: const Text('Advanced Switch Example'),
57 | ),
58 | body: Container(
59 | width: double.infinity,
60 | child: SingleChildScrollView(
61 | padding: EdgeInsets.symmetric(
62 | vertical: 40,
63 | ),
64 | physics: ClampingScrollPhysics(),
65 | child: Column(
66 | crossAxisAlignment: CrossAxisAlignment.center,
67 | children: [
68 | _buildLabel('Switch Theme'),
69 | AdvancedSwitch(
70 | controller: _controller00,
71 | thumb: ValueListenableBuilder(
72 | valueListenable: _controller00,
73 | builder: (_, value, __) {
74 | return Icon(
75 | value ? Icons.lightbulb : Icons.lightbulb_outline,
76 | );
77 | },
78 | ),
79 | ),
80 | UnconstrainedBox(
81 | child: AdvancedSwitch(
82 | controller: _controller01,
83 | width: 110,
84 | enabled: false,
85 | inactiveColor: Colors.red,
86 | activeColor: Colors.green,
87 | activeChild: Text(
88 | 'File selected',
89 | style: TextStyle(
90 | color: Colors.black87,
91 | ),
92 | ),
93 | inactiveChild: Text(
94 | 'No File Selected',
95 | style: TextStyle(
96 | color: Colors.black87,
97 | ),
98 | ),
99 | ),
100 | ),
101 | _buildLabel('Default Switch'),
102 | Row(
103 | mainAxisSize: MainAxisSize.min,
104 | children: [
105 | AdvancedSwitch(
106 | controller: _controller01,
107 | ),
108 | SizedBox(width: 20),
109 | AdvancedSwitch(
110 | controller: _controller01,
111 | thumb: ValueListenableBuilder(
112 | valueListenable: _controller01,
113 | builder: (_, value, __) {
114 | return Icon(value
115 | ? Icons.cloud_upload
116 | : Icons.cloud_download);
117 | },
118 | ),
119 | ),
120 | SizedBox(width: 20),
121 | AdvancedSwitch(
122 | initialValue: true,
123 | enabled: false,
124 | onChanged: (value) {},
125 | ),
126 | ],
127 | ),
128 | _buildLabel('Disabled Switch'),
129 | Row(
130 | mainAxisSize: MainAxisSize.min,
131 | children: [
132 | AdvancedSwitch(
133 | enabled: _enabled,
134 | initialValue: _initialValue,
135 | onChanged: (value) {
136 | setState(() {
137 | _initialValue = !_initialValue;
138 | });
139 | },
140 | ),
141 | SizedBox(width: 25),
142 | AdvancedSwitch(
143 | enabled: _enabled,
144 | controller: ValueNotifier(true),
145 | ),
146 | SizedBox(width: 25),
147 | ElevatedButton(
148 | onPressed: () => setState(() => _enabled = !_enabled),
149 | child: Text('Enable/Disable'),
150 | )
151 | ],
152 | ),
153 | _buildLabel('Color/Icon/Image Switch'),
154 | Row(
155 | mainAxisSize: MainAxisSize.max,
156 | mainAxisAlignment: MainAxisAlignment.spaceAround,
157 | children: [
158 | AdvancedSwitch(
159 | activeColor: Colors.yellow,
160 | inactiveColor: Colors.indigo,
161 | activeChild: Text('Yellow'),
162 | inactiveChild: Text('Indigo'),
163 | width: 80,
164 | controller: _controller03,
165 | ),
166 | AdvancedSwitch(
167 | activeChild: Icon(
168 | Icons.terrain,
169 | color: Colors.blue,
170 | ),
171 | inactiveChild: Icon(Icons.cloud),
172 | activeColor: Colors.yellowAccent,
173 | inactiveColor: Colors.deepPurple,
174 | width: 60,
175 | controller: _controller15,
176 | ),
177 | AdvancedSwitch(
178 | controller: _controller13,
179 | activeImage: AssetImage('assets/images/day_sky.png'),
180 | inactiveImage: AssetImage('assets/images/night_sky.jpg'),
181 | ),
182 | AdvancedSwitch(
183 | controller: _controller14,
184 | width: 80,
185 | activeChild: Text('DAY'),
186 | inactiveChild: Text('NIGHT'),
187 | activeImage: AssetImage('assets/images/day_sky.png'),
188 | inactiveImage: AssetImage('assets/images/night_sky.jpg'),
189 | ),
190 | ],
191 | ),
192 | _buildLabel('ON/OFF Switch'),
193 | Row(
194 | mainAxisSize: MainAxisSize.max,
195 | mainAxisAlignment: MainAxisAlignment.spaceAround,
196 | children: [
197 | AdvancedSwitch(
198 | activeChild: Text('1'),
199 | inactiveChild: Text('0'),
200 | width: 70,
201 | controller: _controller02,
202 | ),
203 | AdvancedSwitch(
204 | activeChild: Text('ON'),
205 | inactiveChild: Text('OFF'),
206 | borderRadius: BorderRadius.circular(5),
207 | width: 76,
208 | controller: _controller04,
209 | ),
210 | AdvancedSwitch(
211 | activeChild: Text('true'),
212 | inactiveChild: Text('false'),
213 | borderRadius: BorderRadius.zero,
214 | width: 76,
215 | controller: _controller05,
216 | ),
217 | ],
218 | ),
219 | _buildLabel('XXS/XS Switch'),
220 | Row(
221 | mainAxisSize: MainAxisSize.max,
222 | mainAxisAlignment: MainAxisAlignment.spaceAround,
223 | children: [
224 | AdvancedSwitch(
225 | width: 16,
226 | height: 8,
227 | controller: _controller06,
228 | ),
229 | AdvancedSwitch(
230 | width: 32,
231 | height: 16,
232 | controller: _controller07,
233 | ),
234 | ],
235 | ),
236 | _buildLabel('S/M/L Switch'),
237 | Row(
238 | mainAxisSize: MainAxisSize.max,
239 | mainAxisAlignment: MainAxisAlignment.spaceAround,
240 | children: [
241 | AdvancedSwitch(
242 | width: 48,
243 | height: 24,
244 | controller: _controller08,
245 | ),
246 | AdvancedSwitch(
247 | width: 56,
248 | height: 28,
249 | controller: _controller09,
250 | ),
251 | AdvancedSwitch(
252 | width: 72,
253 | height: 36,
254 | controller: _controller10,
255 | borderRadius: BorderRadius.circular(18),
256 | ),
257 | ],
258 | ),
259 | _buildLabel('XL/XXL Switch'),
260 | Row(
261 | mainAxisSize: MainAxisSize.max,
262 | mainAxisAlignment: MainAxisAlignment.spaceAround,
263 | children: [
264 | AdvancedSwitch(
265 | width: 96,
266 | height: 48,
267 | controller: _controller11,
268 | borderRadius: BorderRadius.circular(24),
269 | ),
270 | AdvancedSwitch(
271 | width: 112,
272 | height: 56,
273 | controller: _controller12,
274 | borderRadius: BorderRadius.circular(29),
275 | ),
276 | ],
277 | ),
278 | ],
279 | ),
280 | ),
281 | ),
282 | ),
283 | );
284 | }
285 |
286 | Widget _buildLabel(String value) {
287 | return Container(
288 | margin: EdgeInsets.only(
289 | top: 25,
290 | bottom: 5,
291 | ),
292 | child: Text(
293 | '$value',
294 | style: TextStyle(
295 | fontWeight: FontWeight.w500,
296 | fontSize: 16,
297 | color: Colors.grey,
298 | ),
299 | ),
300 | );
301 | }
302 |
303 | @override
304 | void dispose() {
305 | _controller01.dispose();
306 | _controller02.dispose();
307 | _controller03.dispose();
308 | _controller04.dispose();
309 | _controller05.dispose();
310 | _controller06.dispose();
311 | _controller07.dispose();
312 | _controller08.dispose();
313 | _controller09.dispose();
314 | _controller10.dispose();
315 | _controller11.dispose();
316 | _controller12.dispose();
317 | _controller13.dispose();
318 | _controller14.dispose();
319 | _controller15.dispose();
320 |
321 | super.dispose();
322 | }
323 | }
324 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | FB8D147674F71845ED5F0DDD /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF1417EC94E76BDAA994B612 /* Pods_Runner.framework */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXCopyFilesBuildPhase section */
20 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
21 | isa = PBXCopyFilesBuildPhase;
22 | buildActionMask = 2147483647;
23 | dstPath = "";
24 | dstSubfolderSpec = 10;
25 | files = (
26 | );
27 | name = "Embed Frameworks";
28 | runOnlyForDeploymentPostprocessing = 0;
29 | };
30 | /* End PBXCopyFilesBuildPhase section */
31 |
32 | /* Begin PBXFileReference section */
33 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
34 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
35 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
36 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
37 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
38 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
39 | 804370D183DC4F546136DCA1 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
40 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
41 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
42 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
43 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
44 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
45 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
46 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
47 | AF1417EC94E76BDAA994B612 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
48 | D38C5A9B34D2ACBC1E6D1DB6 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
49 | E9A9DBA8C7FA69EECB2BE6AA /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
50 | /* End PBXFileReference section */
51 |
52 | /* Begin PBXFrameworksBuildPhase section */
53 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
54 | isa = PBXFrameworksBuildPhase;
55 | buildActionMask = 2147483647;
56 | files = (
57 | FB8D147674F71845ED5F0DDD /* Pods_Runner.framework in Frameworks */,
58 | );
59 | runOnlyForDeploymentPostprocessing = 0;
60 | };
61 | /* End PBXFrameworksBuildPhase section */
62 |
63 | /* Begin PBXGroup section */
64 | 342FBA4913CBE8B06C7D8404 /* Pods */ = {
65 | isa = PBXGroup;
66 | children = (
67 | D38C5A9B34D2ACBC1E6D1DB6 /* Pods-Runner.debug.xcconfig */,
68 | E9A9DBA8C7FA69EECB2BE6AA /* Pods-Runner.release.xcconfig */,
69 | 804370D183DC4F546136DCA1 /* Pods-Runner.profile.xcconfig */,
70 | );
71 | path = Pods;
72 | sourceTree = "";
73 | };
74 | 6730232C5364BBEDC21329BA /* Frameworks */ = {
75 | isa = PBXGroup;
76 | children = (
77 | AF1417EC94E76BDAA994B612 /* Pods_Runner.framework */,
78 | );
79 | name = Frameworks;
80 | sourceTree = "";
81 | };
82 | 9740EEB11CF90186004384FC /* Flutter */ = {
83 | isa = PBXGroup;
84 | children = (
85 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
86 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
87 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
88 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
89 | );
90 | name = Flutter;
91 | sourceTree = "";
92 | };
93 | 97C146E51CF9000F007C117D = {
94 | isa = PBXGroup;
95 | children = (
96 | 9740EEB11CF90186004384FC /* Flutter */,
97 | 97C146F01CF9000F007C117D /* Runner */,
98 | 97C146EF1CF9000F007C117D /* Products */,
99 | 342FBA4913CBE8B06C7D8404 /* Pods */,
100 | 6730232C5364BBEDC21329BA /* Frameworks */,
101 | );
102 | sourceTree = "";
103 | };
104 | 97C146EF1CF9000F007C117D /* Products */ = {
105 | isa = PBXGroup;
106 | children = (
107 | 97C146EE1CF9000F007C117D /* Runner.app */,
108 | );
109 | name = Products;
110 | sourceTree = "";
111 | };
112 | 97C146F01CF9000F007C117D /* Runner */ = {
113 | isa = PBXGroup;
114 | children = (
115 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
116 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
117 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
118 | 97C147021CF9000F007C117D /* Info.plist */,
119 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
120 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
121 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
122 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
123 | );
124 | path = Runner;
125 | sourceTree = "";
126 | };
127 | /* End PBXGroup section */
128 |
129 | /* Begin PBXNativeTarget section */
130 | 97C146ED1CF9000F007C117D /* Runner */ = {
131 | isa = PBXNativeTarget;
132 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
133 | buildPhases = (
134 | EB6F5EC3200795845EC4265D /* [CP] Check Pods Manifest.lock */,
135 | 9740EEB61CF901F6004384FC /* Run Script */,
136 | 97C146EA1CF9000F007C117D /* Sources */,
137 | 97C146EB1CF9000F007C117D /* Frameworks */,
138 | 97C146EC1CF9000F007C117D /* Resources */,
139 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
140 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
141 | );
142 | buildRules = (
143 | );
144 | dependencies = (
145 | );
146 | name = Runner;
147 | productName = Runner;
148 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
149 | productType = "com.apple.product-type.application";
150 | };
151 | /* End PBXNativeTarget section */
152 |
153 | /* Begin PBXProject section */
154 | 97C146E61CF9000F007C117D /* Project object */ = {
155 | isa = PBXProject;
156 | attributes = {
157 | LastUpgradeCheck = 1300;
158 | ORGANIZATIONNAME = "";
159 | TargetAttributes = {
160 | 97C146ED1CF9000F007C117D = {
161 | CreatedOnToolsVersion = 7.3.1;
162 | LastSwiftMigration = 1100;
163 | };
164 | };
165 | };
166 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
167 | compatibilityVersion = "Xcode 9.3";
168 | developmentRegion = en;
169 | hasScannedForEncodings = 0;
170 | knownRegions = (
171 | en,
172 | Base,
173 | );
174 | mainGroup = 97C146E51CF9000F007C117D;
175 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
176 | projectDirPath = "";
177 | projectRoot = "";
178 | targets = (
179 | 97C146ED1CF9000F007C117D /* Runner */,
180 | );
181 | };
182 | /* End PBXProject section */
183 |
184 | /* Begin PBXResourcesBuildPhase section */
185 | 97C146EC1CF9000F007C117D /* Resources */ = {
186 | isa = PBXResourcesBuildPhase;
187 | buildActionMask = 2147483647;
188 | files = (
189 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
190 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
191 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
192 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
193 | );
194 | runOnlyForDeploymentPostprocessing = 0;
195 | };
196 | /* End PBXResourcesBuildPhase section */
197 |
198 | /* Begin PBXShellScriptBuildPhase section */
199 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
200 | isa = PBXShellScriptBuildPhase;
201 | alwaysOutOfDate = 1;
202 | buildActionMask = 2147483647;
203 | files = (
204 | );
205 | inputPaths = (
206 | );
207 | name = "Thin Binary";
208 | outputPaths = (
209 | );
210 | runOnlyForDeploymentPostprocessing = 0;
211 | shellPath = /bin/sh;
212 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
213 | };
214 | 9740EEB61CF901F6004384FC /* Run Script */ = {
215 | isa = PBXShellScriptBuildPhase;
216 | alwaysOutOfDate = 1;
217 | buildActionMask = 2147483647;
218 | files = (
219 | );
220 | inputPaths = (
221 | );
222 | name = "Run Script";
223 | outputPaths = (
224 | );
225 | runOnlyForDeploymentPostprocessing = 0;
226 | shellPath = /bin/sh;
227 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
228 | };
229 | EB6F5EC3200795845EC4265D /* [CP] Check Pods Manifest.lock */ = {
230 | isa = PBXShellScriptBuildPhase;
231 | buildActionMask = 2147483647;
232 | files = (
233 | );
234 | inputFileListPaths = (
235 | );
236 | inputPaths = (
237 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
238 | "${PODS_ROOT}/Manifest.lock",
239 | );
240 | name = "[CP] Check Pods Manifest.lock";
241 | outputFileListPaths = (
242 | );
243 | outputPaths = (
244 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
245 | );
246 | runOnlyForDeploymentPostprocessing = 0;
247 | shellPath = /bin/sh;
248 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
249 | showEnvVarsInLog = 0;
250 | };
251 | /* End PBXShellScriptBuildPhase section */
252 |
253 | /* Begin PBXSourcesBuildPhase section */
254 | 97C146EA1CF9000F007C117D /* Sources */ = {
255 | isa = PBXSourcesBuildPhase;
256 | buildActionMask = 2147483647;
257 | files = (
258 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
259 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
260 | );
261 | runOnlyForDeploymentPostprocessing = 0;
262 | };
263 | /* End PBXSourcesBuildPhase section */
264 |
265 | /* Begin PBXVariantGroup section */
266 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
267 | isa = PBXVariantGroup;
268 | children = (
269 | 97C146FB1CF9000F007C117D /* Base */,
270 | );
271 | name = Main.storyboard;
272 | sourceTree = "";
273 | };
274 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
275 | isa = PBXVariantGroup;
276 | children = (
277 | 97C147001CF9000F007C117D /* Base */,
278 | );
279 | name = LaunchScreen.storyboard;
280 | sourceTree = "";
281 | };
282 | /* End PBXVariantGroup section */
283 |
284 | /* Begin XCBuildConfiguration section */
285 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
286 | isa = XCBuildConfiguration;
287 | buildSettings = {
288 | ALWAYS_SEARCH_USER_PATHS = NO;
289 | CLANG_ANALYZER_NONNULL = YES;
290 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
291 | CLANG_CXX_LIBRARY = "libc++";
292 | CLANG_ENABLE_MODULES = YES;
293 | CLANG_ENABLE_OBJC_ARC = YES;
294 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
295 | CLANG_WARN_BOOL_CONVERSION = YES;
296 | CLANG_WARN_COMMA = YES;
297 | CLANG_WARN_CONSTANT_CONVERSION = YES;
298 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
299 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
300 | CLANG_WARN_EMPTY_BODY = YES;
301 | CLANG_WARN_ENUM_CONVERSION = YES;
302 | CLANG_WARN_INFINITE_RECURSION = YES;
303 | CLANG_WARN_INT_CONVERSION = YES;
304 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
305 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
306 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
307 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
308 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
309 | CLANG_WARN_STRICT_PROTOTYPES = YES;
310 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
311 | CLANG_WARN_UNREACHABLE_CODE = YES;
312 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
313 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
314 | COPY_PHASE_STRIP = NO;
315 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
316 | ENABLE_NS_ASSERTIONS = NO;
317 | ENABLE_STRICT_OBJC_MSGSEND = YES;
318 | GCC_C_LANGUAGE_STANDARD = gnu99;
319 | GCC_NO_COMMON_BLOCKS = YES;
320 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
321 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
322 | GCC_WARN_UNDECLARED_SELECTOR = YES;
323 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
324 | GCC_WARN_UNUSED_FUNCTION = YES;
325 | GCC_WARN_UNUSED_VARIABLE = YES;
326 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
327 | MTL_ENABLE_DEBUG_INFO = NO;
328 | SDKROOT = iphoneos;
329 | SUPPORTED_PLATFORMS = iphoneos;
330 | TARGETED_DEVICE_FAMILY = "1,2";
331 | VALIDATE_PRODUCT = YES;
332 | };
333 | name = Profile;
334 | };
335 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
336 | isa = XCBuildConfiguration;
337 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
338 | buildSettings = {
339 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
340 | CLANG_ENABLE_MODULES = YES;
341 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
342 | ENABLE_BITCODE = NO;
343 | FRAMEWORK_SEARCH_PATHS = (
344 | "$(inherited)",
345 | "$(PROJECT_DIR)/Flutter",
346 | );
347 | INFOPLIST_FILE = Runner/Info.plist;
348 | LD_RUNPATH_SEARCH_PATHS = (
349 | "$(inherited)",
350 | "@executable_path/Frameworks",
351 | );
352 | LIBRARY_SEARCH_PATHS = (
353 | "$(inherited)",
354 | "$(PROJECT_DIR)/Flutter",
355 | );
356 | PRODUCT_BUNDLE_IDENTIFIER = io.alexmelnyk.flutterSwitcherExample;
357 | PRODUCT_NAME = "$(TARGET_NAME)";
358 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
359 | SWIFT_VERSION = 5.0;
360 | VERSIONING_SYSTEM = "apple-generic";
361 | };
362 | name = Profile;
363 | };
364 | 97C147031CF9000F007C117D /* Debug */ = {
365 | isa = XCBuildConfiguration;
366 | buildSettings = {
367 | ALWAYS_SEARCH_USER_PATHS = NO;
368 | CLANG_ANALYZER_NONNULL = YES;
369 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
370 | CLANG_CXX_LIBRARY = "libc++";
371 | CLANG_ENABLE_MODULES = YES;
372 | CLANG_ENABLE_OBJC_ARC = YES;
373 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
374 | CLANG_WARN_BOOL_CONVERSION = YES;
375 | CLANG_WARN_COMMA = YES;
376 | CLANG_WARN_CONSTANT_CONVERSION = YES;
377 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
378 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
379 | CLANG_WARN_EMPTY_BODY = YES;
380 | CLANG_WARN_ENUM_CONVERSION = YES;
381 | CLANG_WARN_INFINITE_RECURSION = YES;
382 | CLANG_WARN_INT_CONVERSION = YES;
383 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
384 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
385 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
386 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
387 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
388 | CLANG_WARN_STRICT_PROTOTYPES = YES;
389 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
390 | CLANG_WARN_UNREACHABLE_CODE = YES;
391 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
392 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
393 | COPY_PHASE_STRIP = NO;
394 | DEBUG_INFORMATION_FORMAT = dwarf;
395 | ENABLE_STRICT_OBJC_MSGSEND = YES;
396 | ENABLE_TESTABILITY = YES;
397 | GCC_C_LANGUAGE_STANDARD = gnu99;
398 | GCC_DYNAMIC_NO_PIC = NO;
399 | GCC_NO_COMMON_BLOCKS = YES;
400 | GCC_OPTIMIZATION_LEVEL = 0;
401 | GCC_PREPROCESSOR_DEFINITIONS = (
402 | "DEBUG=1",
403 | "$(inherited)",
404 | );
405 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
406 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
407 | GCC_WARN_UNDECLARED_SELECTOR = YES;
408 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
409 | GCC_WARN_UNUSED_FUNCTION = YES;
410 | GCC_WARN_UNUSED_VARIABLE = YES;
411 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
412 | MTL_ENABLE_DEBUG_INFO = YES;
413 | ONLY_ACTIVE_ARCH = YES;
414 | SDKROOT = iphoneos;
415 | TARGETED_DEVICE_FAMILY = "1,2";
416 | };
417 | name = Debug;
418 | };
419 | 97C147041CF9000F007C117D /* Release */ = {
420 | isa = XCBuildConfiguration;
421 | buildSettings = {
422 | ALWAYS_SEARCH_USER_PATHS = NO;
423 | CLANG_ANALYZER_NONNULL = YES;
424 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
425 | CLANG_CXX_LIBRARY = "libc++";
426 | CLANG_ENABLE_MODULES = YES;
427 | CLANG_ENABLE_OBJC_ARC = YES;
428 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
429 | CLANG_WARN_BOOL_CONVERSION = YES;
430 | CLANG_WARN_COMMA = YES;
431 | CLANG_WARN_CONSTANT_CONVERSION = YES;
432 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
433 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
434 | CLANG_WARN_EMPTY_BODY = YES;
435 | CLANG_WARN_ENUM_CONVERSION = YES;
436 | CLANG_WARN_INFINITE_RECURSION = YES;
437 | CLANG_WARN_INT_CONVERSION = YES;
438 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
439 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
440 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
441 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
442 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
443 | CLANG_WARN_STRICT_PROTOTYPES = YES;
444 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
445 | CLANG_WARN_UNREACHABLE_CODE = YES;
446 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
447 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
448 | COPY_PHASE_STRIP = NO;
449 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
450 | ENABLE_NS_ASSERTIONS = NO;
451 | ENABLE_STRICT_OBJC_MSGSEND = YES;
452 | GCC_C_LANGUAGE_STANDARD = gnu99;
453 | GCC_NO_COMMON_BLOCKS = YES;
454 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
455 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
456 | GCC_WARN_UNDECLARED_SELECTOR = YES;
457 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
458 | GCC_WARN_UNUSED_FUNCTION = YES;
459 | GCC_WARN_UNUSED_VARIABLE = YES;
460 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
461 | MTL_ENABLE_DEBUG_INFO = NO;
462 | SDKROOT = iphoneos;
463 | SUPPORTED_PLATFORMS = iphoneos;
464 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
465 | TARGETED_DEVICE_FAMILY = "1,2";
466 | VALIDATE_PRODUCT = YES;
467 | };
468 | name = Release;
469 | };
470 | 97C147061CF9000F007C117D /* Debug */ = {
471 | isa = XCBuildConfiguration;
472 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
473 | buildSettings = {
474 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
475 | CLANG_ENABLE_MODULES = YES;
476 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
477 | ENABLE_BITCODE = NO;
478 | FRAMEWORK_SEARCH_PATHS = (
479 | "$(inherited)",
480 | "$(PROJECT_DIR)/Flutter",
481 | );
482 | INFOPLIST_FILE = Runner/Info.plist;
483 | LD_RUNPATH_SEARCH_PATHS = (
484 | "$(inherited)",
485 | "@executable_path/Frameworks",
486 | );
487 | LIBRARY_SEARCH_PATHS = (
488 | "$(inherited)",
489 | "$(PROJECT_DIR)/Flutter",
490 | );
491 | PRODUCT_BUNDLE_IDENTIFIER = io.alexmelnyk.flutterSwitcherExample;
492 | PRODUCT_NAME = "$(TARGET_NAME)";
493 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
494 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
495 | SWIFT_VERSION = 5.0;
496 | VERSIONING_SYSTEM = "apple-generic";
497 | };
498 | name = Debug;
499 | };
500 | 97C147071CF9000F007C117D /* Release */ = {
501 | isa = XCBuildConfiguration;
502 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
503 | buildSettings = {
504 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
505 | CLANG_ENABLE_MODULES = YES;
506 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
507 | ENABLE_BITCODE = NO;
508 | FRAMEWORK_SEARCH_PATHS = (
509 | "$(inherited)",
510 | "$(PROJECT_DIR)/Flutter",
511 | );
512 | INFOPLIST_FILE = Runner/Info.plist;
513 | LD_RUNPATH_SEARCH_PATHS = (
514 | "$(inherited)",
515 | "@executable_path/Frameworks",
516 | );
517 | LIBRARY_SEARCH_PATHS = (
518 | "$(inherited)",
519 | "$(PROJECT_DIR)/Flutter",
520 | );
521 | PRODUCT_BUNDLE_IDENTIFIER = io.alexmelnyk.flutterSwitcherExample;
522 | PRODUCT_NAME = "$(TARGET_NAME)";
523 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
524 | SWIFT_VERSION = 5.0;
525 | VERSIONING_SYSTEM = "apple-generic";
526 | };
527 | name = Release;
528 | };
529 | /* End XCBuildConfiguration section */
530 |
531 | /* Begin XCConfigurationList section */
532 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
533 | isa = XCConfigurationList;
534 | buildConfigurations = (
535 | 97C147031CF9000F007C117D /* Debug */,
536 | 97C147041CF9000F007C117D /* Release */,
537 | 249021D3217E4FDB00AE95B9 /* Profile */,
538 | );
539 | defaultConfigurationIsVisible = 0;
540 | defaultConfigurationName = Release;
541 | };
542 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
543 | isa = XCConfigurationList;
544 | buildConfigurations = (
545 | 97C147061CF9000F007C117D /* Debug */,
546 | 97C147071CF9000F007C117D /* Release */,
547 | 249021D4217E4FDB00AE95B9 /* Profile */,
548 | );
549 | defaultConfigurationIsVisible = 0;
550 | defaultConfigurationName = Release;
551 | };
552 | /* End XCConfigurationList section */
553 | };
554 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
555 | }
556 |
--------------------------------------------------------------------------------