├── ios ├── Assets │ └── .gitkeep ├── Classes │ ├── FlutterCustomDialogPlugin.h │ └── FlutterCustomDialogPlugin.m ├── .gitignore └── flutter_custom_dialog.podspec ├── test └── flutter_custom_dialog_test.dart ├── example ├── ios │ ├── Flutter │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── flutter_export_environment.sh │ │ └── AppFrameworkInfo.plist │ ├── Runner │ │ ├── AppDelegate.h │ │ ├── Assets.xcassets │ │ │ ├── LaunchImage.imageset │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ ├── README.md │ │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ └── Contents.json │ │ ├── main.m │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ │ └── Info.plist │ ├── Runner.xcworkspace │ │ └── contents.xcworkspacedata │ └── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ │ └── project.pbxproj ├── images │ └── success.png ├── 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 │ │ │ │ │ └── values │ │ │ │ │ │ └── styles.xml │ │ │ │ ├── java │ │ │ │ │ └── yy │ │ │ │ │ │ └── inc │ │ │ │ │ │ └── flutter_custom_dialog_example │ │ │ │ │ │ └── MainActivity.java │ │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ └── build.gradle ├── .metadata ├── .flutter-plugins-dependencies ├── lib │ ├── dialog │ │ ├── develop_dialog.dart │ │ ├── progress_dialog.dart │ │ ├── notice_dialog.dart │ │ ├── bottom_sheet_dialog.dart │ │ ├── listview_dialog.dart │ │ └── alert_dialog.dart │ └── main.dart ├── README.md ├── test │ └── widget_test.dart ├── .gitignore ├── pubspec.yaml └── pubspec.lock ├── android ├── settings.gradle ├── gradle.properties ├── .gitignore ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── yy │ │ └── inc │ │ └── flutter_custom_dialog │ │ └── FlutterCustomDialogPlugin.java ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── build.gradle ├── .gitignore ├── image ├── gif │ ├── 1.gif │ ├── 2.gif │ ├── 3.gif │ ├── 4.gif │ ├── 5.gif │ ├── 6.gif │ ├── 7.gif │ ├── 8.gif │ ├── 9.gif │ ├── 111.gif │ ├── 222.gif │ ├── 333.gif │ └── 444.gif └── png │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── 6.png │ ├── 7.png │ ├── 8.png │ ├── 9.png │ └── 10.png ├── .idea ├── vcs.xml ├── libraries │ ├── Flutter_Plugins.xml │ ├── Flutter_for_Android.xml │ └── Dart_SDK.xml ├── misc.xml ├── runConfigurations │ └── example_lib_main_dart.xml ├── modules.xml ├── codeStyles │ └── Project.xml └── workspace.xml ├── .metadata ├── local.properties ├── flutter_custom_dialog.iml ├── CHANGELOG.md ├── pubspec.yaml ├── lib ├── flutter_custom_dialog_widget.dart └── flutter_custom_dialog.dart ├── pubspec.lock ├── README_CN.md ├── LICENSE └── README.md /ios/Assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/flutter_custom_dialog_test.dart: -------------------------------------------------------------------------------- 1 | void main() {} 2 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'flutter_custom_dialog' 2 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | build/ 8 | -------------------------------------------------------------------------------- /image/gif/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/gif/1.gif -------------------------------------------------------------------------------- /image/gif/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/gif/2.gif -------------------------------------------------------------------------------- /image/gif/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/gif/3.gif -------------------------------------------------------------------------------- /image/gif/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/gif/4.gif -------------------------------------------------------------------------------- /image/gif/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/gif/5.gif -------------------------------------------------------------------------------- /image/gif/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/gif/6.gif -------------------------------------------------------------------------------- /image/gif/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/gif/7.gif -------------------------------------------------------------------------------- /image/gif/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/gif/8.gif -------------------------------------------------------------------------------- /image/gif/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/gif/9.gif -------------------------------------------------------------------------------- /image/png/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/png/1.png -------------------------------------------------------------------------------- /image/png/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/png/2.png -------------------------------------------------------------------------------- /image/png/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/png/3.png -------------------------------------------------------------------------------- /image/png/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/png/4.png -------------------------------------------------------------------------------- /image/png/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/png/5.png -------------------------------------------------------------------------------- /image/png/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/png/6.png -------------------------------------------------------------------------------- /image/png/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/png/7.png -------------------------------------------------------------------------------- /image/png/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/png/8.png -------------------------------------------------------------------------------- /image/png/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/png/9.png -------------------------------------------------------------------------------- /image/gif/111.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/gif/111.gif -------------------------------------------------------------------------------- /image/gif/222.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/gif/222.gif -------------------------------------------------------------------------------- /image/gif/333.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/gif/333.gif -------------------------------------------------------------------------------- /image/gif/444.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/gif/444.gif -------------------------------------------------------------------------------- /image/png/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/image/png/10.png -------------------------------------------------------------------------------- /example/images/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/images/success.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | 5 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /ios/Classes/FlutterCustomDialogPlugin.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface FlutterCustomDialogPlugin : NSObject 4 | @end 5 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/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/YYFlutter/flutter-custom-dialog/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/YYFlutter/flutter-custom-dialog/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/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/YYFlutter/flutter-custom-dialog/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/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/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YYFlutter/flutter-custom-dialog/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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-4.10.2-all.zip 6 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/yy/inc/flutter_custom_dialog_example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package yy.inc.flutter_custom_dialog_example; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity extends FlutterActivity { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /.idea/libraries/Flutter_Plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /.idea/libraries/Flutter_for_Android.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/runConfigurations/example_lib_main_dart.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.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: 760635e6dbf9180222171ac189199982a65cf608 8 | channel: unknown 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /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 and should not be manually edited. 5 | 6 | version: 7 | revision: 760635e6dbf9180222171ac189199982a65cf608 8 | channel: unknown 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /local.properties: -------------------------------------------------------------------------------- 1 | ## This file must *NOT* be checked into Version Control Systems, 2 | # as it contains information specific to your local configuration. 3 | # 4 | # Location of the SDK. This is only used by Gradle. 5 | # For customization when using a Version Control System, please read the 6 | # header note. 7 | #Mon Aug 16 16:54:26 CST 2021 8 | sdk.dir=C\:\\Users\\Administrator\\AppData\\Local\\Android\\Sdk 9 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /example/.flutter-plugins-dependencies: -------------------------------------------------------------------------------- 1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"android":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_custom_dialog","dependencies":[]}],"date_created":"2022-09-08 10:51:06.169356","version":"2.5.3"} -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/lib/dialog/develop_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_custom_dialog/flutter_custom_dialog.dart'; 3 | 4 | YYDialog YYFixTextFieldDialog() { 5 | return YYDialog().build() 6 | ..width = 120 7 | ..height = 110 8 | ..backgroundColor = Colors.white 9 | ..borderRadius = 10.0 10 | ..gravity = Gravity.bottom 11 | ..widget( 12 | Padding( 13 | padding: EdgeInsets.all(24), 14 | child: TextField(), 15 | ), 16 | ) 17 | ..show(); 18 | } 19 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | /Flutter/flutter_export_environment.sh -------------------------------------------------------------------------------- /example/ios/Flutter/flutter_export_environment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This is a generated file; do not edit or check into version control. 3 | export "FLUTTER_ROOT=G:\flutter" 4 | export "FLUTTER_APPLICATION_PATH=C:\YYLive4-OpenSource\flutter-custom-dialog\example" 5 | export "COCOAPODS_PARALLEL_CODE_SIGN=true" 6 | export "FLUTTER_TARGET=lib\main.dart" 7 | export "FLUTTER_BUILD_DIR=build" 8 | export "FLUTTER_BUILD_NAME=1.0.0" 9 | export "FLUTTER_BUILD_NUMBER=1" 10 | export "DART_OBFUSCATION=false" 11 | export "TRACK_WIDGET_CREATION=false" 12 | export "TREE_SHAKE_ICONS=false" 13 | export "PACKAGE_CONFIG=.packages" 14 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # flutter_custom_dialog_example 2 | 3 | Demonstrates how to use the flutter_custom_dialog 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 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | group 'yy.inc.flutter_custom_dialog' 2 | version '1.0' 3 | 4 | buildscript { 5 | repositories { 6 | google() 7 | jcenter() 8 | } 9 | 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:3.2.1' 12 | } 13 | } 14 | 15 | rootProject.allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | apply plugin: 'com.android.library' 23 | 24 | android { 25 | compileSdkVersion 28 26 | 27 | defaultConfig { 28 | minSdkVersion 20 29 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 30 | } 31 | lintOptions { 32 | disable 'InvalidPackage' 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ios/flutter_custom_dialog.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 3 | # 4 | Pod::Spec.new do |s| 5 | s.name = 'flutter_custom_dialog' 6 | s.version = '0.0.1' 7 | s.summary = 'A new flutter plugin project.' 8 | s.description = <<-DESC 9 | A new flutter plugin project. 10 | DESC 11 | s.homepage = 'http://example.com' 12 | s.license = { :file => '../LICENSE' } 13 | s.author = { 'Your Company' => 'email@example.com' } 14 | s.source = { :path => '.' } 15 | s.source_files = 'Classes/**/*' 16 | s.public_header_files = 'Classes/**/*.h' 17 | s.dependency 'Flutter' 18 | 19 | s.ios.deployment_target = '8.0' 20 | end 21 | 22 | -------------------------------------------------------------------------------- /ios/Classes/FlutterCustomDialogPlugin.m: -------------------------------------------------------------------------------- 1 | #import "FlutterCustomDialogPlugin.h" 2 | 3 | @implementation FlutterCustomDialogPlugin 4 | + (void)registerWithRegistrar:(NSObject*)registrar { 5 | FlutterMethodChannel* channel = [FlutterMethodChannel 6 | methodChannelWithName:@"flutter_custom_dialog" 7 | binaryMessenger:[registrar messenger]]; 8 | FlutterCustomDialogPlugin* instance = [[FlutterCustomDialogPlugin alloc] init]; 9 | [registrar addMethodCallDelegate:instance channel:channel]; 10 | } 11 | 12 | - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { 13 | if ([@"getPlatformVersion" isEqualToString:call.method]) { 14 | result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]); 15 | } else { 16 | result(FlutterMethodNotImplemented); 17 | } 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /example/lib/dialog/progress_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_custom_dialog/flutter_custom_dialog.dart'; 3 | 4 | YYDialog YYProgressDialogNoBody() { 5 | return YYDialog().build() 6 | ..width = 200 7 | ..borderRadius = 4.0 8 | ..circularProgress( 9 | padding: EdgeInsets.all(24.0), 10 | valueColor: Colors.orange[500], 11 | ) 12 | ..show(); 13 | } 14 | 15 | YYDialog YYProgressDialogBody() { 16 | return YYDialog().build() 17 | ..width = 200 18 | ..borderRadius = 4.0 19 | ..circularProgress( 20 | padding: EdgeInsets.all(24.0), 21 | valueColor: Colors.orange[500], 22 | ) 23 | ..text( 24 | padding: EdgeInsets.fromLTRB(18.0, 0.0, 18.0, 12.0), 25 | text: "正在加载中...", 26 | alignment: Alignment.center, 27 | color: Colors.orange[500], 28 | fontSize: 18.0, 29 | ) 30 | ..show(); 31 | } 32 | -------------------------------------------------------------------------------- /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 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /flutter_custom_dialog.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /example/lib/dialog/notice_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_custom_dialog/flutter_custom_dialog.dart'; 3 | 4 | YYDialog YYNoticeDialog() { 5 | return YYDialog().build() 6 | ..width = 120 7 | ..height = 110 8 | ..backgroundColor = Colors.black.withOpacity(0.8) 9 | ..borderRadius = 10.0 10 | ..widget(Padding( 11 | padding: EdgeInsets.only(top: 21), 12 | child: Image.asset( 13 | 'images/success.png', 14 | width: 38, 15 | height: 38, 16 | ), 17 | )) 18 | ..widget(Padding( 19 | padding: EdgeInsets.only(top: 10), 20 | child: Text( 21 | "Success", 22 | style: TextStyle( 23 | fontSize: 15, 24 | color: Colors.white, 25 | ), 26 | ), 27 | )) 28 | ..animatedFunc = (child, animation) { 29 | return ScaleTransition( 30 | child: child, 31 | scale: Tween(begin: 0.0, end: 1.0).animate(animation), 32 | ); 33 | } 34 | ..show(); 35 | } 36 | -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_custom_dialog_example/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Verify Platform version', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that platform version is retrieved. 19 | expect( 20 | find.byWidgetPredicate( 21 | (Widget widget) => widget is Text && 22 | widget.data.startsWith('Running on:'), 23 | ), 24 | findsOneWidget, 25 | ); 26 | }); 27 | } 28 | -------------------------------------------------------------------------------- /example/lib/dialog/bottom_sheet_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_custom_dialog/flutter_custom_dialog.dart'; 3 | 4 | YYDialog YYBottomSheetDialog() { 5 | return YYDialog().build() 6 | ..gravity = Gravity.bottom 7 | ..gravityAnimationEnable = true 8 | ..backgroundColor = Colors.transparent 9 | ..widget(Container( 10 | width: 300, 11 | height: 45, 12 | margin: EdgeInsets.only(bottom: 10), 13 | decoration: BoxDecoration( 14 | borderRadius: BorderRadius.circular(8.0), 15 | color: Colors.white, 16 | ), 17 | child: Center( 18 | child: Text("Block"), 19 | ), 20 | )) 21 | ..widget(Container( 22 | width: 300, 23 | height: 45, 24 | margin: EdgeInsets.only(bottom: 20), 25 | decoration: BoxDecoration( 26 | borderRadius: BorderRadius.circular(8.0), 27 | color: Colors.white, 28 | ), 29 | child: Center( 30 | child: Text( 31 | "cancel", 32 | style: TextStyle(color: Colors.grey[400]), 33 | ), 34 | ), 35 | )) 36 | ..show(); 37 | } 38 | -------------------------------------------------------------------------------- /android/src/main/java/yy/inc/flutter_custom_dialog/FlutterCustomDialogPlugin.java: -------------------------------------------------------------------------------- 1 | package yy.inc.flutter_custom_dialog; 2 | 3 | import androidx.annotation.NonNull; 4 | 5 | import io.flutter.embedding.engine.plugins.FlutterPlugin; 6 | import io.flutter.plugin.common.MethodCall; 7 | import io.flutter.plugin.common.MethodChannel; 8 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler; 9 | import io.flutter.plugin.common.MethodChannel.Result; 10 | 11 | /** FlutterCustomDialogPlugin */ 12 | public class FlutterCustomDialogPlugin implements FlutterPlugin, MethodCallHandler { 13 | 14 | private MethodChannel channel; 15 | 16 | @Override 17 | public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) { 18 | channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "flutter_custom_dialog"); 19 | channel.setMethodCallHandler(this); 20 | } 21 | 22 | @Override 23 | public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) { 24 | if (call.method.equals("getPlatformVersion")) { 25 | result.success("Android " + android.os.Build.VERSION.RELEASE); 26 | } else { 27 | result.notImplemented(); 28 | } 29 | } 30 | 31 | @Override 32 | public void onDetachedFromEngine(FlutterPluginBinding binding) { 33 | channel.setMethodCallHandler(null); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0 2 | 3 | * first release 4 | * welcome to submit bug 5 | 6 | ## 1.0.1 7 | 8 | * fix dismiss Bug 9 | 10 | ## 1.0.2 11 | 12 | * add gravity of leftTop,leftBottom,rightTop,rightBottom 13 | 14 | ## 1.0.3 15 | 16 | * add gravityAnimationEnable property 17 | 18 | ## 1.0.4 19 | 20 | * Without the Context to invoke 21 | 22 | ## 1.0.5 23 | 24 | * Modify constraints property 25 | 26 | ## 1.0.6 27 | 28 | * Fix Gradle version in `gradle-wrapper.properties` 29 | 30 | ## 1.0.7 31 | 32 | * Fix Gradle build Aar 33 | 34 | ## 1.0.8 35 | 36 | * Fix Gradle build Aar for iOS 37 | 38 | ## 1.0.9 39 | 40 | * Update Android kotlin version to 1.3.0 41 | 42 | ## 1.0.10 43 | 44 | * add Log 45 | 46 | ## 1.0.11 47 | 48 | * remove kotlin 49 | 50 | ## 1.0.12 51 | 52 | * modify text Semantic 53 | 54 | ## 1.0.13 55 | 56 | * remove kotlin again 57 | 58 | ## 1.0.14 59 | 60 | * remove log 61 | 62 | ## 1.0.15 63 | 64 | * add callback 65 | 66 | ## 1.0.16 67 | 68 | * add decoration property 69 | 70 | ## 1.0.17 71 | 72 | * add decoration property 73 | 74 | ## 1.0.18 75 | 76 | * add color property for listRadio 77 | 78 | ## 1.0.19 79 | 80 | * fix a padding bug 81 | 82 | ## 1.0.20 83 | 84 | * add a useRootNavigator property 85 | 86 | ## 1.0.21 87 | 88 | * Add SpaceEvenly Gravity 89 | 90 | ## 1.1.0 91 | 92 | * Migrate to null safety 93 | 94 | ## 1.1.1 95 | 96 | * try to fix Android V2 embedding 97 | 98 | ## 1.2.0 99 | 100 | * fix Android V2 embedding -------------------------------------------------------------------------------- /.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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_custom_dialog_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 | 45 | 46 | -------------------------------------------------------------------------------- /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 | .dart_tool/ 26 | .flutter-plugins 27 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | # Android related 33 | **/android/**/gradle-wrapper.jar 34 | **/android/.gradle 35 | **/android/captures/ 36 | **/android/gradlew 37 | **/android/gradlew.bat 38 | **/android/local.properties 39 | **/android/**/GeneratedPluginRegistrant.java 40 | 41 | # iOS/XCode related 42 | **/ios/**/*.mode1v3 43 | **/ios/**/*.mode2v3 44 | **/ios/**/*.moved-aside 45 | **/ios/**/*.pbxuser 46 | **/ios/**/*.perspectivev3 47 | **/ios/**/*sync/ 48 | **/ios/**/.sconsign.dblite 49 | **/ios/**/.tags* 50 | **/ios/**/.vagrant/ 51 | **/ios/**/DerivedData/ 52 | **/ios/**/Icon? 53 | **/ios/**/Pods/ 54 | **/ios/**/.symlinks/ 55 | **/ios/**/profile 56 | **/ios/**/xcuserdata 57 | **/ios/.generated/ 58 | **/ios/Flutter/App.framework 59 | **/ios/Flutter/Flutter.framework 60 | **/ios/Flutter/Generated.xcconfig 61 | **/ios/Flutter/app.flx 62 | **/ios/Flutter/app.zip 63 | **/ios/Flutter/flutter_assets/ 64 | **/ios/Flutter/flutter_export_environment.sh 65 | **/ios/ServiceDefinitions.json 66 | **/ios/Runner/GeneratedPluginRegistrant.* 67 | 68 | # Exceptions to above rules. 69 | !**/ios/**/default.mode1v3 70 | !**/ios/**/default.mode2v3 71 | !**/ios/**/default.pbxuser 72 | !**/ios/**/default.perspectivev3 73 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 74 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 12 | 19 | 23 | 26 | 29 | 30 | 31 | 32 | 33 | 34 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "yy.inc.flutter_custom_dialog_example" 37 | minSdkVersion 20 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_custom_dialog_example 2 | description: Demonstrates how to use the flutter_custom_dialog plugin. 3 | publish_to: 'none' 4 | 5 | environment: 6 | sdk: ">=2.1.0 <3.0.0" 7 | 8 | dependencies: 9 | flutter: 10 | sdk: flutter 11 | 12 | # The following adds the Cupertino Icons font to your application. 13 | # Use with the CupertinoIcons class for iOS style icons. 14 | cupertino_icons: ^0.1.2 15 | 16 | dev_dependencies: 17 | flutter_test: 18 | sdk: flutter 19 | 20 | flutter_custom_dialog: 21 | path: ../ 22 | 23 | # For information on the generic Dart part of this file, see the 24 | # following page: https://dart.dev/tools/pub/pubspec 25 | 26 | # The following section is specific to Flutter. 27 | flutter: 28 | 29 | # The following line ensures that the Material Icons font is 30 | # included with your application, so that you can use the icons in 31 | # the material Icons class. 32 | uses-material-design: true 33 | 34 | # To add assets to your application, add an assets section, like this: 35 | assets: 36 | - images/ 37 | 38 | # An image asset can refer to one or more resolution-specific "variants", see 39 | # https://flutter.dev/assets-and-images/#resolution-aware. 40 | 41 | # For details regarding adding assets from package dependencies, see 42 | # https://flutter.dev/assets-and-images/#from-packages 43 | 44 | # To add custom fonts to your application, add a fonts section here, 45 | # in this "flutter" section. Each entry in this list should have a 46 | # "family" key with the font family name, and a "fonts" key with a 47 | # list giving the asset and other descriptors for the font. For 48 | # example: 49 | # fonts: 50 | # - family: Schyler 51 | # fonts: 52 | # - asset: fonts/Schyler-Regular.ttf 53 | # - asset: fonts/Schyler-Italic.ttf 54 | # style: italic 55 | # - family: Trajan Pro 56 | # fonts: 57 | # - asset: fonts/TrajanPro.ttf 58 | # - asset: fonts/TrajanPro_Bold.ttf 59 | # weight: 700 60 | # 61 | # For details regarding fonts from package dependencies, 62 | # see https://flutter.dev/custom-fonts/#from-packages 63 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_custom_dialog 2 | description: Semantic dialog | Made In YY.inc | Welcome to contribute 3 | version: 1.3.0 4 | homepage: https://github.com/YYFlutter/flutter-custom-dialog.git 5 | 6 | environment: 7 | sdk: ">=2.12.0 <3.0.0" 8 | flutter: ">=1.10.0" 9 | 10 | dependencies: 11 | flutter: 12 | sdk: flutter 13 | 14 | dev_dependencies: 15 | flutter_test: 16 | sdk: flutter 17 | 18 | # For information on the generic Dart part of this file, see the 19 | # following page: https://dart.dev/tools/pub/pubspec 20 | 21 | # The following section is specific to Flutter. 22 | flutter: 23 | # This section identifies this Flutter project as a plugin project. 24 | # The androidPackage and pluginClass identifiers should not ordinarily 25 | # be modified. They are used by the tooling to maintain consistency when 26 | # adding or updating assets for this project. 27 | plugin: 28 | platforms: 29 | android: 30 | package: yy.inc.flutter_custom_dialog 31 | pluginClass: FlutterCustomDialogPlugin 32 | ios: 33 | pluginClass: FlutterCustomDialogPlugin 34 | 35 | # To add assets to your plugin package, add an assets section, like this: 36 | # assets: 37 | # - images/a_dot_burr.jpeg 38 | # - images/a_dot_ham.jpeg 39 | # 40 | # For details regarding assets in packages, see 41 | # https://flutter.dev/assets-and-images/#from-packages 42 | # 43 | # An image asset can refer to one or more resolution-specific "variants", see 44 | # https://flutter.dev/assets-and-images/#resolution-aware. 45 | 46 | # To add custom fonts to your plugin package, add a fonts section here, 47 | # in this "flutter" section. Each entry in this list should have a 48 | # "family" key with the font family name, and a "fonts" key with a 49 | # list giving the asset and other descriptors for the font. For 50 | # example: 51 | # fonts: 52 | # - family: Schyler 53 | # fonts: 54 | # - asset: fonts/Schyler-Regular.ttf 55 | # - asset: fonts/Schyler-Italic.ttf 56 | # style: italic 57 | # - family: Trajan Pro 58 | # fonts: 59 | # - asset: fonts/TrajanPro.ttf 60 | # - asset: fonts/TrajanPro_Bold.ttf 61 | # weight: 700 62 | # 63 | # For details regarding fonts in packages, see 64 | # https://flutter.dev/custom-fonts/#from-packages 65 | -------------------------------------------------------------------------------- /lib/flutter_custom_dialog_widget.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | import 'package:flutter_custom_dialog/flutter_custom_dialog.dart'; 6 | export 'package:flutter_custom_dialog/flutter_custom_dialog_widget.dart'; 7 | 8 | class YYRadioListTile extends StatefulWidget { 9 | YYRadioListTile({ 10 | Key? key, 11 | this.items, 12 | this.intialValue, 13 | this.color, 14 | this.activeColor, 15 | this.onChanged, 16 | }) : assert(items != null), 17 | super(key: key); 18 | 19 | final List? items; 20 | final Color? color; 21 | final Color? activeColor; 22 | final intialValue; 23 | final Function(int)? onChanged; 24 | 25 | @override 26 | State createState() { 27 | return YYRadioListTileState(); 28 | } 29 | } 30 | 31 | class YYRadioListTileState extends State { 32 | var groupId = -1; 33 | 34 | void intialSelectedItem() { 35 | //intialValue: 36 | //The button initializes the position. 37 | //If it is not filled, it is not selected. 38 | if (groupId == -1) { 39 | groupId = widget.intialValue ?? -1; 40 | } 41 | } 42 | 43 | @override 44 | Widget build(BuildContext context) { 45 | intialSelectedItem(); 46 | 47 | return ListView.builder( 48 | padding: EdgeInsets.all(0.0), 49 | shrinkWrap: true, 50 | itemCount: widget.items?.length ?? 0, 51 | itemBuilder: (BuildContext context, int index) { 52 | return Material( 53 | color: widget.color, 54 | child: RadioListTile( 55 | title: Text( 56 | widget.items?[index].text ?? "", 57 | style: TextStyle( 58 | fontSize: widget.items?[index].fontSize ?? 14, 59 | fontWeight: 60 | widget.items?[index].fontWeight ?? FontWeight.normal, 61 | color: widget.items?[index].color ?? Colors.black), 62 | ), 63 | value: index, 64 | groupValue: groupId, 65 | activeColor: widget.activeColor, 66 | onChanged: (int? value) { 67 | setState(() { 68 | if (widget.onChanged != null) { 69 | widget.onChanged!(value ?? 0); 70 | } 71 | groupId = value ?? -1; 72 | }); 73 | }, 74 | ), 75 | ); 76 | }, 77 | ); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.8.1" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.0" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.3.1" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.0" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.15.0" 46 | fake_async: 47 | dependency: transitive 48 | description: 49 | name: fake_async 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.2.0" 53 | flutter: 54 | dependency: "direct main" 55 | description: flutter 56 | source: sdk 57 | version: "0.0.0" 58 | flutter_test: 59 | dependency: "direct dev" 60 | description: flutter 61 | source: sdk 62 | version: "0.0.0" 63 | matcher: 64 | dependency: transitive 65 | description: 66 | name: matcher 67 | url: "https://pub.dartlang.org" 68 | source: hosted 69 | version: "0.12.10" 70 | meta: 71 | dependency: transitive 72 | description: 73 | name: meta 74 | url: "https://pub.dartlang.org" 75 | source: hosted 76 | version: "1.7.0" 77 | path: 78 | dependency: transitive 79 | description: 80 | name: path 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "1.8.0" 84 | sky_engine: 85 | dependency: transitive 86 | description: flutter 87 | source: sdk 88 | version: "0.0.99" 89 | source_span: 90 | dependency: transitive 91 | description: 92 | name: source_span 93 | url: "https://pub.dartlang.org" 94 | source: hosted 95 | version: "1.8.1" 96 | stack_trace: 97 | dependency: transitive 98 | description: 99 | name: stack_trace 100 | url: "https://pub.dartlang.org" 101 | source: hosted 102 | version: "1.10.0" 103 | stream_channel: 104 | dependency: transitive 105 | description: 106 | name: stream_channel 107 | url: "https://pub.dartlang.org" 108 | source: hosted 109 | version: "2.1.0" 110 | string_scanner: 111 | dependency: transitive 112 | description: 113 | name: string_scanner 114 | url: "https://pub.dartlang.org" 115 | source: hosted 116 | version: "1.1.0" 117 | term_glyph: 118 | dependency: transitive 119 | description: 120 | name: term_glyph 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "1.2.0" 124 | test_api: 125 | dependency: transitive 126 | description: 127 | name: test_api 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "0.4.2" 131 | typed_data: 132 | dependency: transitive 133 | description: 134 | name: typed_data 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "1.3.0" 138 | vector_math: 139 | dependency: transitive 140 | description: 141 | name: vector_math 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "2.1.0" 145 | sdks: 146 | dart: ">=2.12.0 <3.0.0" 147 | flutter: ">=1.10.0" 148 | -------------------------------------------------------------------------------- /example/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.8.1" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.0" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.3.1" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.0" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.15.0" 46 | cupertino_icons: 47 | dependency: "direct main" 48 | description: 49 | name: cupertino_icons 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "0.1.3" 53 | fake_async: 54 | dependency: transitive 55 | description: 56 | name: fake_async 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.2.0" 60 | flutter: 61 | dependency: "direct main" 62 | description: flutter 63 | source: sdk 64 | version: "0.0.0" 65 | flutter_custom_dialog: 66 | dependency: "direct dev" 67 | description: 68 | path: ".." 69 | relative: true 70 | source: path 71 | version: "1.1.1" 72 | flutter_test: 73 | dependency: "direct dev" 74 | description: flutter 75 | source: sdk 76 | version: "0.0.0" 77 | matcher: 78 | dependency: transitive 79 | description: 80 | name: matcher 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "0.12.10" 84 | meta: 85 | dependency: transitive 86 | description: 87 | name: meta 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "1.7.0" 91 | path: 92 | dependency: transitive 93 | description: 94 | name: path 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "1.8.0" 98 | sky_engine: 99 | dependency: transitive 100 | description: flutter 101 | source: sdk 102 | version: "0.0.99" 103 | source_span: 104 | dependency: transitive 105 | description: 106 | name: source_span 107 | url: "https://pub.dartlang.org" 108 | source: hosted 109 | version: "1.8.1" 110 | stack_trace: 111 | dependency: transitive 112 | description: 113 | name: stack_trace 114 | url: "https://pub.dartlang.org" 115 | source: hosted 116 | version: "1.10.0" 117 | stream_channel: 118 | dependency: transitive 119 | description: 120 | name: stream_channel 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "2.1.0" 124 | string_scanner: 125 | dependency: transitive 126 | description: 127 | name: string_scanner 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "1.1.0" 131 | term_glyph: 132 | dependency: transitive 133 | description: 134 | name: term_glyph 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "1.2.0" 138 | test_api: 139 | dependency: transitive 140 | description: 141 | name: test_api 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "0.4.2" 145 | typed_data: 146 | dependency: transitive 147 | description: 148 | name: typed_data 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "1.3.0" 152 | vector_math: 153 | dependency: transitive 154 | description: 155 | name: vector_math 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "2.1.0" 159 | sdks: 160 | dart: ">=2.12.0 <3.0.0" 161 | flutter: ">=1.10.0" 162 | -------------------------------------------------------------------------------- /example/lib/dialog/listview_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_custom_dialog/flutter_custom_dialog.dart'; 3 | 4 | var listTileItems = [ 5 | ListTileItem( 6 | padding: EdgeInsets.fromLTRB(16.0, 6.0, 16.0, 6.0), 7 | leading: ClipOval( 8 | child: Image.network( 9 | "https://imgavater.ui.cn/avatar/3/3/4/9/1269433.jpg?imageMogr2/auto-orient/crop/!1219x1219a12a0/thumbnail/148x148", 10 | height: 50, 11 | width: 50, 12 | fit: BoxFit.cover, 13 | ), 14 | ), 15 | text: "user01@gmail.com", 16 | color: Colors.grey, 17 | fontSize: 16.0, 18 | ), 19 | ListTileItem( 20 | padding: EdgeInsets.fromLTRB(16.0, 6.0, 16.0, 6.0), 21 | leading: ClipOval( 22 | child: Image.network( 23 | "https://imgavater.ui.cn/avatar/1/4/7/8/958741.jpg?imageMogr2/auto-orient/crop/!563x563a377a167/thumbnail/60x60", 24 | height: 50, 25 | width: 50, 26 | fit: BoxFit.cover, 27 | ), 28 | ), 29 | text: "user02@gmail.com", 30 | color: Colors.grey, 31 | fontSize: 16.0, 32 | ), 33 | ListTileItem( 34 | padding: EdgeInsets.fromLTRB(16.0, 6.0, 16.0, 6.0), 35 | leading: ClipOval( 36 | child: Image.network( 37 | "https://imgavater.ui.cn/avatar/6/0/7/5/165706.png?imageMogr2/auto-orient/crop/!798x798a109a100/thumbnail/148x148", 38 | height: 50, 39 | width: 50, 40 | fit: BoxFit.cover, 41 | ), 42 | ), 43 | text: "user03@gmail.com", 44 | color: Colors.grey, 45 | fontSize: 16.0, 46 | ), 47 | ListTileItem( 48 | padding: EdgeInsets.fromLTRB(16.0, 6.0, 16.0, 6.0), 49 | leading: ClipOval( 50 | child: Container( 51 | width: 50, 52 | height: 50, 53 | child: Icon(Icons.add, size: 30, color: Colors.white), 54 | color: Colors.grey[500], 55 | )), 56 | text: "Add account", 57 | color: Colors.grey, 58 | fontSize: 16.0, 59 | ), 60 | ]; 61 | 62 | var radioItems = [ 63 | RadioItem( 64 | padding: EdgeInsets.only(left: 6.0), 65 | text: "None", 66 | color: Colors.black, 67 | fontSize: 16.0, 68 | ), 69 | RadioItem( 70 | padding: EdgeInsets.only(left: 6.0), 71 | text: "Callisto", 72 | color: Colors.black, 73 | fontSize: 16.0, 74 | ), 75 | RadioItem( 76 | padding: EdgeInsets.only(left: 6.0), 77 | text: "Ganymede", 78 | color: Colors.black, 79 | fontSize: 16.0, 80 | ), 81 | RadioItem( 82 | padding: EdgeInsets.only(left: 6.0), 83 | text: "Luna", 84 | color: Colors.black, 85 | fontSize: 16.0, 86 | ), 87 | RadioItem( 88 | padding: EdgeInsets.only(left: 6.0), 89 | text: "Oberon", 90 | color: Colors.black, 91 | fontSize: 16.0, 92 | ), 93 | RadioItem( 94 | padding: EdgeInsets.only(left: 6.0), 95 | text: "Phobos", 96 | color: Colors.black, 97 | fontSize: 16.0, 98 | ), 99 | RadioItem( 100 | padding: EdgeInsets.only(left: 6.0), 101 | text: "Dione", 102 | color: Colors.black, 103 | fontSize: 16.0, 104 | ), 105 | RadioItem( 106 | padding: EdgeInsets.only(left: 6.0), 107 | text: "James", 108 | color: Colors.black, 109 | fontSize: 16.0, 110 | ), 111 | RadioItem( 112 | padding: EdgeInsets.only(left: 6.0), 113 | text: "Lina", 114 | color: Colors.black, 115 | fontSize: 16.0, 116 | ), 117 | ]; 118 | 119 | YYDialog YYListViewDialogListTile() { 120 | return YYDialog().build() 121 | ..width = 280 122 | ..borderRadius = 4.0 123 | ..text( 124 | padding: EdgeInsets.fromLTRB(18.0, 18.0, 18.0, 12.0), 125 | text: "Set backup account", 126 | color: Colors.black, 127 | fontSize: 18.0, 128 | fontWeight: FontWeight.w500, 129 | ) 130 | ..listViewOfListTile( 131 | items: listTileItems, 132 | onClickItemListener: (index) { 133 | var listTileItem = listTileItems[index]; 134 | print(listTileItem.text + " is on click"); 135 | }) 136 | ..show(); 137 | } 138 | 139 | YYDialog YYListViewDialogListRadio() { 140 | return YYDialog().build() 141 | ..width = 280 142 | ..borderRadius = 4.0 143 | ..text( 144 | padding: EdgeInsets.fromLTRB(18.0, 22.0, 18.0, 18.0), 145 | text: "Phone ringtone", 146 | color: Colors.black, 147 | fontSize: 18.0, 148 | fontWeight: FontWeight.w500, 149 | ) 150 | ..divider() 151 | ..listViewOfRadioButton( 152 | items: radioItems, 153 | height: 370, 154 | intialValue: 2, 155 | color: Colors.white, 156 | activeColor: Colors.deepPurpleAccent, 157 | onClickItemListener: (index) { 158 | var radioItem = radioItems[index]; 159 | print(radioItem.text + " is on click"); 160 | }) 161 | ..divider() 162 | ..doubleButton( 163 | padding: EdgeInsets.only(top: 8.0, bottom: 8.0), 164 | gravity: Gravity.right, 165 | text1: "CANCEL", 166 | color1: Colors.deepPurpleAccent, 167 | fontSize1: 14.0, 168 | fontWeight1: FontWeight.bold, 169 | text2: "OK", 170 | color2: Colors.deepPurpleAccent, 171 | fontSize2: 14.0, 172 | fontWeight2: FontWeight.bold, 173 | ) 174 | ..show(); 175 | } 176 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |