├── HEAD ├── example ├── linux │ ├── .gitignore │ ├── main.cc │ ├── flutter │ │ ├── generated_plugin_registrant.h │ │ ├── generated_plugin_registrant.cc │ │ ├── generated_plugins.cmake │ │ └── CMakeLists.txt │ ├── my_application.h │ └── my_application.cc ├── ios │ ├── Runner │ │ ├── Runner-Bridging-Header.h │ │ ├── Assets.xcassets │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── 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 │ │ │ ├── README.md │ │ │ └── Contents.json │ │ ├── AppDelegate.swift │ │ ├── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ │ └── Info.plist │ ├── Flutter │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── ephemeral │ │ │ ├── flutter_lldbinit │ │ │ └── flutter_lldb_helper.py │ │ └── AppFrameworkInfo.plist │ ├── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── .gitignore │ ├── Podfile.lock │ └── Podfile ├── assets │ ├── app_icon.png │ ├── playstore.svg │ ├── logo.svg │ └── github.svg ├── android │ ├── gradle.properties │ ├── app │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ └── launcher_icon.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ └── launcher_icon.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ └── launcher_icon.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ └── launcher_icon.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ └── launcher_icon.png │ │ │ │ │ ├── drawable │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── drawable-v21 │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── values │ │ │ │ │ │ └── styles.xml │ │ │ │ │ └── values-night │ │ │ │ │ │ └── styles.xml │ │ │ │ ├── kotlin │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── example │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── .gitignore │ ├── build.gradle │ └── settings.gradle ├── macos │ ├── Runner │ │ ├── Configs │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ ├── Warnings.xcconfig │ │ │ └── AppInfo.xcconfig │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ ├── app_icon_1024.png │ │ │ │ ├── app_icon_128.png │ │ │ │ ├── app_icon_16.png │ │ │ │ ├── app_icon_256.png │ │ │ │ ├── app_icon_32.png │ │ │ │ ├── app_icon_512.png │ │ │ │ ├── app_icon_64.png │ │ │ │ └── Contents.json │ │ ├── AppDelegate.swift │ │ ├── Release.entitlements │ │ ├── DebugProfile.entitlements │ │ ├── MainFlutterWindow.swift │ │ └── Info.plist │ ├── .gitignore │ ├── Flutter │ │ ├── Flutter-Debug.xcconfig │ │ ├── Flutter-Release.xcconfig │ │ └── GeneratedPluginRegistrant.swift │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── Podfile ├── windows │ ├── runner │ │ ├── resources │ │ │ └── app_icon.ico │ │ ├── resource.h │ │ ├── utils.h │ │ ├── runner.exe.manifest │ │ ├── flutter_window.h │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ ├── utils.cpp │ │ ├── flutter_window.cpp │ │ ├── Runner.rc │ │ └── win32_window.h │ ├── .gitignore │ └── flutter │ │ ├── generated_plugin_registrant.h │ │ ├── generated_plugin_registrant.cc │ │ ├── generated_plugins.cmake │ │ └── CMakeLists.txt ├── test │ └── widget_test.dart ├── pubspec.yaml ├── .gitignore ├── analysis_options.yaml └── .metadata ├── description ├── icons ├── line.png ├── slack.png ├── dribble.png ├── facebook.png ├── google.png ├── linkedin.png ├── twitter.png ├── wechat.png ├── whatsapp.png ├── youtube.png └── pinterest.png ├── lib ├── types │ ├── gf_alert_type.dart │ ├── gf_toast_type.dart │ ├── gf_form_field_type.dart │ ├── gf_border_type.dart │ ├── gf_radio_type.dart │ ├── gf_checkbox_type.dart │ ├── gf_loader_type.dart │ ├── gf_progress_type.dart │ ├── gf_animation_type.dart │ ├── gf_toggle_type.dart │ ├── gf_button_type.dart │ ├── gf_typography_type.dart │ └── gf_social_type.dart ├── shape │ ├── gf_avatar_shape.dart │ ├── gf_button_shape.dart │ ├── gf_textfield_shape.dart │ ├── gf_badge_shape.dart │ └── gf_icon_button_shape.dart ├── position │ ├── gf_position.dart │ ├── gf_toast_position.dart │ └── gf_badge_position.dart ├── components │ ├── form │ │ ├── form_field │ │ │ ├── widgets │ │ │ │ ├── providers │ │ │ │ │ ├── gf_datepickerprovider.dart │ │ │ │ │ ├── gf_timepickerprovider.dart │ │ │ │ │ ├── gf_radioprovider.dart │ │ │ │ │ ├── gf_formdropdownprovider.dart │ │ │ │ │ ├── gf_questionbuttonprovider.dart │ │ │ │ │ ├── gf_formfieldprovider.dart │ │ │ │ │ ├── gf_multichipselectionprovider.dart │ │ │ │ │ └── gf_multicheckboxselectionprovider.dart │ │ │ │ ├── gf_formdropdown.dart │ │ │ │ ├── gf_multiselectcheckbox.dart │ │ │ │ └── gf_multichoicechip.dart │ │ │ ├── gf_formhandler_widget.dart │ │ │ ├── decorations │ │ │ │ └── gf_formfield_decoration.dart │ │ │ └── validators │ │ │ │ └── validators.dart │ │ └── gf_form_provider.dart │ ├── badge │ │ └── gf_icon_badge.dart │ ├── sticky_header │ │ ├── gf_sticky_header.dart │ │ └── gf_sticky_header_builder.dart │ ├── border │ │ └── gf_border.dart │ ├── floating_widget │ │ └── gf_floating_widget.dart │ └── image │ │ └── gf_image_overlay.dart ├── size │ └── gf_size.dart ├── direction │ └── gf_shimmer_direction.dart └── colors │ ├── gf_luxury_color.dart │ ├── gf_food_color.dart │ ├── gf_element_color.dart │ ├── gf_emotion_color.dart │ ├── gf_space_color.dart │ ├── gf_social_color.dart │ ├── gf_kids_education_color.dart │ ├── gf_medical_healthcare_color.dart │ └── gf_color.dart ├── .metadata ├── config ├── pubspec.yaml ├── .travis.yml ├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md └── FUNDING.yml ├── LICENSE ├── .gitignore ├── test ├── icon_badge_test.dart ├── tabbarview_test.dart ├── shimmer_test.dart ├── typography_test.dart ├── avatar_test.dart └── items_carousel_test.dart └── CODE_OF_CONDUCT.md /HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /example/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /description: -------------------------------------------------------------------------------- 1 | Unnamed repository; edit this file 'description' to name the repository. 2 | -------------------------------------------------------------------------------- /icons/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/icons/line.png -------------------------------------------------------------------------------- /icons/slack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/icons/slack.png -------------------------------------------------------------------------------- /icons/dribble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/icons/dribble.png -------------------------------------------------------------------------------- /icons/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/icons/facebook.png -------------------------------------------------------------------------------- /icons/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/icons/google.png -------------------------------------------------------------------------------- /icons/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/icons/linkedin.png -------------------------------------------------------------------------------- /icons/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/icons/twitter.png -------------------------------------------------------------------------------- /icons/wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/icons/wechat.png -------------------------------------------------------------------------------- /icons/whatsapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/icons/whatsapp.png -------------------------------------------------------------------------------- /icons/youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/icons/youtube.png -------------------------------------------------------------------------------- /icons/pinterest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/icons/pinterest.png -------------------------------------------------------------------------------- /lib/types/gf_alert_type.dart: -------------------------------------------------------------------------------- 1 | enum GFAlertType { 2 | basic, 3 | rounded, 4 | fullWidth, 5 | } 6 | -------------------------------------------------------------------------------- /lib/types/gf_toast_type.dart: -------------------------------------------------------------------------------- 1 | enum GFToastType { 2 | basic, 3 | rounded, 4 | fullWidth, 5 | } 6 | -------------------------------------------------------------------------------- /lib/types/gf_form_field_type.dart: -------------------------------------------------------------------------------- 1 | enum GfFormFieldType { name, password, email, phone, text, number } 2 | -------------------------------------------------------------------------------- /lib/types/gf_border_type.dart: -------------------------------------------------------------------------------- 1 | enum GFBorderType { 2 | circle, 3 | rRect, 4 | rect, 5 | oval, 6 | } 7 | -------------------------------------------------------------------------------- /lib/types/gf_radio_type.dart: -------------------------------------------------------------------------------- 1 | enum GFRadioType { 2 | basic, 3 | square, 4 | custom, 5 | blunt, 6 | } 7 | -------------------------------------------------------------------------------- /example/assets/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/assets/app_icon.png -------------------------------------------------------------------------------- /lib/types/gf_checkbox_type.dart: -------------------------------------------------------------------------------- 1 | enum GFCheckboxType { 2 | basic, 3 | circle, 4 | square, 5 | custom, 6 | } 7 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /example/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /lib/types/gf_loader_type.dart: -------------------------------------------------------------------------------- 1 | enum GFLoaderType { 2 | android, 3 | ios, 4 | square, 5 | circle, 6 | custom, 7 | } 8 | -------------------------------------------------------------------------------- /example/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /example/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /lib/types/gf_progress_type.dart: -------------------------------------------------------------------------------- 1 | enum GFProgressType { circular, linear } 2 | 3 | enum GFProgressHeadType { 4 | circular, 5 | square, 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Flutter/ephemeral/flutter_lldbinit: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | command script import --relative-to-command-file flutter_lldb_helper.py 6 | -------------------------------------------------------------------------------- /example/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/android/app/src/main/res/mipmap-hdpi/launcher_icon.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/android/app/src/main/res/mipmap-mdpi/launcher_icon.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /lib/types/gf_animation_type.dart: -------------------------------------------------------------------------------- 1 | enum GFAnimationType { 2 | align, 3 | size, 4 | container, 5 | rotateTransition, 6 | scaleTransition, 7 | slideTransition, 8 | textStyle, 9 | } 10 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/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/ionicfirebaseapp/getwidget/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/ionicfirebaseapp/getwidget/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/ionicfirebaseapp/getwidget/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/ionicfirebaseapp/getwidget/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/ionicfirebaseapp/getwidget/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/ionicfirebaseapp/getwidget/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/ionicfirebaseapp/getwidget/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/ionicfirebaseapp/getwidget/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/ionicfirebaseapp/getwidget/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/ionicfirebaseapp/getwidget/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/ionicfirebaseapp/getwidget/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/ionicfirebaseapp/getwidget/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/ionicfirebaseapp/getwidget/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/ionicfirebaseapp/getwidget/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | 3 | void main() { 4 | testWidgets('Basic test', (WidgetTester tester) async { 5 | prints('Test paassed'); 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ionicfirebaseapp/getwidget/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/ionicfirebaseapp/getwidget/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /example/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/kotlin/com/example/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.ionicfirebaseapp.getwidget_example 2 | 3 | 4 | import io.flutter.embedding.android.FlutterActivity 5 | 6 | class MainActivity: FlutterActivity() { 7 | } 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 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-8.9-bin.zip 7 | -------------------------------------------------------------------------------- /example/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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/macos/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 | -------------------------------------------------------------------------------- /example/macos/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: 68587a0916366e9512a78df22c44163d041dd5f3 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /example/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import url_launcher_macos 9 | 10 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 11 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 12 | } 13 | -------------------------------------------------------------------------------- /config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = false 5 | logallrefupdates = true 6 | ignorecase = true 7 | precomposeunicode = true 8 | [remote "origin"] 9 | url = https://github.com/Sandipkakadiya/gftemp.git 10 | fetch = +refs/heads/*:refs/remotes/origin/* 11 | [branch "master"] 12 | remote = origin 13 | merge = refs/heads/master 14 | -------------------------------------------------------------------------------- /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 | app/.cxx -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/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/windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /lib/shape/gf_avatar_shape.dart: -------------------------------------------------------------------------------- 1 | /// [GFAvatarShape] is used to shape the GFAvatar widget. 2 | enum GFAvatarShape { 3 | /// Default shape is [GFAvatarShape.circle], used for rounded avatar 4 | circle, 5 | 6 | /// [GFAvatarShape.standard], used for square avatar with rounded corners 7 | standard, 8 | 9 | /// [GFAvatarShape.square], used for square avatar 10 | square, 11 | } 12 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /lib/position/gf_position.dart: -------------------------------------------------------------------------------- 1 | /// [GFPosition] is used to position the icon, badges to start or end of the button 2 | /// See GFButton and GFButtonBadge 3 | enum GFPosition { 4 | /// [GFPosition.start] is used to place icon, badges to start of the GFButton and GFButtonBadge 5 | start, 6 | 7 | /// [GFPosition.end] is used to place icon, badges to end of the GFButton and GFButtonBadge 8 | end, 9 | } 10 | -------------------------------------------------------------------------------- /lib/components/form/form_field/widgets/providers/gf_datepickerprovider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GfDatePickerData extends ChangeNotifier { 4 | GfDatePickerData({required this.selectedDate}); 5 | DateTime selectedDate; 6 | 7 | void setDate(DateTime x) { 8 | selectedDate = x; 9 | notifyListeners(); 10 | } 11 | 12 | DateTime getDate() => selectedDate; 13 | } 14 | -------------------------------------------------------------------------------- /lib/components/form/form_field/widgets/providers/gf_timepickerprovider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GfTimePickerData extends ChangeNotifier { 4 | GfTimePickerData({required this.selectedTime}); 5 | TimeOfDay selectedTime; 6 | 7 | void setTime(TimeOfDay x) { 8 | selectedTime = x; 9 | notifyListeners(); 10 | } 11 | 12 | TimeOfDay getTime() => selectedTime; 13 | } 14 | -------------------------------------------------------------------------------- /lib/size/gf_size.dart: -------------------------------------------------------------------------------- 1 | /// [GFSize] is used to change the size of the widget. 2 | class GFSize { 3 | /// [GFSize.SMALL] is used for small size widget 4 | static const double SMALL = 30; 5 | 6 | /// Default size if [GFSize.MEDIUM] is used for medium size widget 7 | static const double MEDIUM = 35; 8 | 9 | /// [GFSize.LARGE] is used for large size widget 10 | static const double LARGE = 40; 11 | } 12 | -------------------------------------------------------------------------------- /example/linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /example/windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /lib/components/form/form_field/widgets/providers/gf_radioprovider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GfGenderButtonData extends ChangeNotifier { 4 | GfGenderButtonData({required this.selectedValue}); 5 | 6 | String selectedValue; 7 | 8 | String getValue() => selectedValue; 9 | void setValue(String valuenew) { 10 | selectedValue = valuenew; 11 | notifyListeners(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/shape/gf_button_shape.dart: -------------------------------------------------------------------------------- 1 | /// [GFButtonShape] is used to shape the GFButton widget. 2 | enum GFButtonShape { 3 | /// [GFButtonShape.pills], used for pills shaped button with rounded corners 4 | pills, 5 | 6 | /// Default shape is [GFButtonShape.standard], used for standard rectangle button with rounded corners 7 | standard, 8 | 9 | /// [GFButtonShape.square], used for square button 10 | square, 11 | } 12 | -------------------------------------------------------------------------------- /lib/shape/gf_textfield_shape.dart: -------------------------------------------------------------------------------- 1 | /// [GFTextFieldShape] is used to shape the GFIconButton widget. 2 | enum GFTextFieldShape { 3 | /// [GFTextFieldShape.roundedsquare], TextField with rounded square edges 4 | roundedsquare, 5 | 6 | /// [GFTextFieldShape.pills], used for TextField with curved edges 7 | pills, 8 | 9 | /// [GFTextFieldShape.square], used for TextField with squared edges 10 | square, 11 | } 12 | -------------------------------------------------------------------------------- /example/windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void RegisterPlugins(flutter::PluginRegistry* registry) { 12 | UrlLauncherWindowsRegisterWithRegistrar( 13 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 14 | } 15 | -------------------------------------------------------------------------------- /lib/components/form/form_field/widgets/providers/gf_formdropdownprovider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GfFormDropdownData extends ChangeNotifier { 4 | GfFormDropdownData({required this.selectedValue}); 5 | 6 | String selectedValue; 7 | 8 | String getValue() => selectedValue; 9 | 10 | void setValue(String valuenew) { 11 | selectedValue = valuenew; 12 | notifyListeners(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /example/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /lib/components/form/form_field/widgets/providers/gf_questionbuttonprovider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GfQuestionButtonData extends ChangeNotifier { 4 | GfQuestionButtonData({required this.selectedValue}); 5 | 6 | String selectedValue; 7 | 8 | String getValue() => selectedValue; 9 | 10 | void setValue(String valuenew) { 11 | selectedValue = valuenew; 12 | notifyListeners(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/components/form/form_field/widgets/providers/gf_formfieldprovider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GfFormFieldData extends ChangeNotifier { 4 | GfFormFieldData({required this.gfFormFieldController}); 5 | TextEditingController gfFormFieldController; 6 | 7 | void setText(String x) { 8 | gfFormFieldController.text = x; 9 | notifyListeners(); 10 | } 11 | 12 | String getData() => gfFormFieldController.value.text; 13 | } 14 | -------------------------------------------------------------------------------- /lib/types/gf_toggle_type.dart: -------------------------------------------------------------------------------- 1 | /// [GFToggleType] is used to change the shape of 2 | enum GFToggleType { 3 | /// [GFToggleType.android] is used for basic toggle shape of android mode 4 | android, 5 | 6 | /// [GFToggleType.custom] is used to change the shape of GFToggle 7 | custom, 8 | 9 | /// [GFToggleType.ios] is used for basic toggle shape of ios mode 10 | ios, 11 | 12 | /// [GFToggleType.square] is used for square shape of GFToggle 13 | square, 14 | } 15 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: example 2 | description: GetWidget Demo app 3 | 4 | version: 1.0.0+1 5 | 6 | environment: 7 | sdk: ">=2.12.0 <3.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | getwidget: 13 | path: ../ 14 | cupertino_icons: ^1.0.8 15 | flutter_svg: ^2.0.17 16 | url_launcher: ^6.3.1 17 | 18 | dev_dependencies: 19 | flutter_test: 20 | sdk: flutter 21 | 22 | flutter: 23 | uses-material-design: true 24 | assets: 25 | - assets/ 26 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /example/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/shape/gf_badge_shape.dart: -------------------------------------------------------------------------------- 1 | /// [GFBadgeShape] is used to shape the GFBadge widget. 2 | enum GFBadgeShape { 3 | /// [GFBadgeShape.circle], used for rounded shape badge 4 | circle, 5 | 6 | /// [GFBadgeShape.pills], used for pills shaped badge with rounded corners 7 | pills, 8 | 9 | /// Default shape is [GFBadgeShape.standard], used for standard rectangle badge with rounded corners 10 | standard, 11 | 12 | /// [GFBadgeShape.square], used for square badge 13 | square, 14 | } 15 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/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/linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 14 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/shape/gf_icon_button_shape.dart: -------------------------------------------------------------------------------- 1 | /// [GFIconButtonShape] is used to shape the GFIconButton widget. 2 | enum GFIconButtonShape { 3 | /// [GFIconButtonShape.circle], used for rounded shape icon button 4 | circle, 5 | 6 | /// [GFIconButtonShape.pills], used for pills shaped icon button with rounded corners 7 | pills, 8 | 9 | /// Default shape is [GFIconButtonShape.standard], used for standard rectangle icon button with rounded corners 10 | standard, 11 | 12 | /// [GFIconButtonShape.square], used for square icon button 13 | square, 14 | } 15 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: getwidget 2 | description: GetWidget is open source library that come with pre-build 1000+ UI components. It makes development faster & more enjoyable. You can customize the component as per your need. 3 | version: 7.0.0 4 | homepage: https://github.com/ionicfirebaseapp/getwidget 5 | 6 | environment: 7 | sdk: ">=2.12.0 <4.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | 13 | dev_dependencies: 14 | flutter_test: 15 | sdk: flutter 16 | 17 | flutter: 18 | uses-material-design: true 19 | assets: 20 | - icons/ 21 | -------------------------------------------------------------------------------- /lib/types/gf_button_type.dart: -------------------------------------------------------------------------------- 1 | /// [GFButtonType] is used to change the type of widgets 2 | enum GFButtonType { 3 | /// Default type is [GFButtonType.solid], used to fill with color for widget 4 | solid, 5 | 6 | /// Type [GFButtonType.outline], used for widget with outline border and fill color with Colors.transparent 7 | outline, 8 | 9 | /// Type [GFButtonType.outline2x], used for widget with outline2x border and border.width = 2.0 and fill color with Colors.transparent 10 | outline2x, 11 | 12 | /// Type [GFButtonType.transparent], used for widget with fill color with Colors.transparent 13 | transparent, 14 | } 15 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | os: 2 | - linux 3 | 4 | sudo: false 5 | 6 | git: 7 | depth: 3 8 | 9 | cache: 10 | directories: 11 | - $HOME/.pub-cache 12 | 13 | env: 14 | - FLUTTER_VERSION=stable 15 | 16 | # Only building master means that we don't run two builds for each pull request. 17 | branches: 18 | only: [master] 19 | 20 | before_script: 21 | - cd ../ 22 | - git clone https://github.com/flutter/flutter.git -b $FLUTTER_VERSION 23 | - ./flutter/bin/flutter doctor 24 | - cd getwidget/ 25 | 26 | script: 27 | - ./../flutter/bin/flutter analyze . 28 | - ./../flutter/bin/flutter format . 29 | - ./../flutter/bin/flutter test 30 | -------------------------------------------------------------------------------- /example/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /example/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = example 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /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 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | rootProject.buildDir = '../build' 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | afterEvaluate { project -> 12 | if (project.hasProperty('android')) { 13 | project.android { 14 | if (namespace == null) { 15 | namespace project.group 16 | } 17 | } 18 | } 19 | } 20 | } 21 | 22 | subprojects { 23 | project.evaluationDependsOn(':app') 24 | } 25 | 26 | tasks.register('clean', Delete) { 27 | delete rootProject.buildDir 28 | } 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: getwidget 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /lib/types/gf_typography_type.dart: -------------------------------------------------------------------------------- 1 | /// [GFTypographyType] is used to change the type of GFTypography title widget. 2 | enum GFTypographyType { 3 | /// [GFTypographyType.typo1] type used for title widget with fontSize = 25.0 4 | typo1, 5 | 6 | /// [GFTypographyType.typo2] type used for title widget with fontSize = 22.0 7 | typo2, 8 | 9 | /// [GFTypographyType.typo3] type used for title widget with fontSize = 19.0 10 | typo3, 11 | 12 | /// [GFTypographyType.typo4] type used for title widget with fontSize = 17.0 13 | typo4, 14 | 15 | /// [GFTypographyType.typo5] type used for title widget with fontSize = 15.0 16 | typo5, 17 | 18 | /// [GFTypographyType.typo6] type used for title widget with fontSize = 13.0 19 | typo6, 20 | } 21 | -------------------------------------------------------------------------------- /example/windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /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 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Exceptions to above rules. 37 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages -------------------------------------------------------------------------------- /lib/components/form/form_field/gf_formhandler_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:getwidget/components/form/gf_form_provider.dart'; 3 | 4 | class GfFormHandlerWidget extends InheritedWidget { 5 | const GfFormHandlerWidget( 6 | {required this.gfFormHandler, required Widget child}) 7 | : super(child: child); 8 | 9 | final GfFormHandler gfFormHandler; 10 | 11 | static GfFormHandlerWidget of(BuildContext context) { 12 | final GfFormHandlerWidget? result = 13 | context.dependOnInheritedWidgetOfExactType(); 14 | assert(result != null, 'No GfFormHandlerWidget found in context'); 15 | return result!; 16 | } 17 | 18 | @override 19 | bool updateShouldNotify(covariant InheritedWidget oldWidget) => false; 20 | } 21 | -------------------------------------------------------------------------------- /lib/direction/gf_shimmer_direction.dart: -------------------------------------------------------------------------------- 1 | /// [GFShimmerDirection] controls the direction of the shimmer effect 2 | /// 3 | enum GFShimmerDirection { 4 | /// Default direction is [GFShimmerDirection.leftToRight], which starts the 5 | /// shimmer effect animation from left to right side of the child Widget. 6 | leftToRight, 7 | 8 | /// Direction [GFShimmerDirection.rightToLeft], which starts the shimmer 9 | /// effect animation from right to left side of the child Widget. 10 | rightToLeft, 11 | 12 | /// Direction [GFShimmerDirection.topToBottom], which starts the shimmer 13 | /// effect animation from top to bottom side of the child Widget. 14 | topToBottom, 15 | 16 | /// Direction [GFShimmerDirection.bottomToTop], which starts the shimmer 17 | /// effect animation from bottom to top side of the child Widget. 18 | bottomToTop 19 | } 20 | -------------------------------------------------------------------------------- /example/linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | url_launcher_linux 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /example/windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | url_launcher_windows 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /lib/types/gf_social_type.dart: -------------------------------------------------------------------------------- 1 | enum GFSocialType { 2 | facebook, 3 | whatsapp, 4 | twitter, 5 | google, 6 | dribble, 7 | linkedin, 8 | youtube, 9 | slack, 10 | pinterest, 11 | wechat, 12 | line, 13 | } 14 | 15 | enum GFSocialButtonType { 16 | /// Default type is [GFSocialButtonType.solid], used to fill with color for widget 17 | solid, 18 | 19 | /// Type [GFSocialButtonType.outline], used for widget with outline border and fill color with Colors.transparent 20 | outline, 21 | 22 | /// Type [GFSocialButtonType.outline2x], used for widget with outline2x border and border.width = 2.0 and fill color with Colors.transparent 23 | outline2x, 24 | 25 | /// Type [GFSocialButtonType.transparent], used for widget with fill color with Colors.transparent 26 | transparent, 27 | 28 | /// Type [GFSocialButtonType.icon], used for widget with just icon filled in square container 29 | icon, 30 | } 31 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file('local.properties').withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty('flutter.sdk') 6 | assert flutterSdkPath != null, 'flutter.sdk not set in local.properties' 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id 'dev.flutter.flutter-plugin-loader' version '1.0.0' 21 | id 'com.android.application' version '8.3.2' apply false 22 | id 'org.jetbrains.kotlin.android' version '1.9.20' apply false 23 | id 'com.google.gms.google-services' version '4.3.15' apply false 24 | } 25 | 26 | include ':app' 27 | -------------------------------------------------------------------------------- /example/assets/playstore.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /example/windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /example/assets/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Get Flutter 8 | 9 | 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /example/windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/position/gf_toast_position.dart: -------------------------------------------------------------------------------- 1 | /// ToastPosition Used to define the position of the Toast on the screen 2 | /// See GFToast 3 | enum GFToastPosition { 4 | /// [GFToastPosition.TOP] is used to show toast top of the screen 5 | TOP, 6 | 7 | /// [GFToastPosition.BOTTOM] is used to show toast bottom of the screen 8 | BOTTOM, 9 | 10 | /// [GFToastPosition.CENTER] is used to show toast center of the screen 11 | CENTER, 12 | 13 | /// [GFToastPosition.TOP_LEFT] is used to show toast top left of the screen 14 | TOP_LEFT, 15 | 16 | /// [GFToastPosition.TOP_RIGHT] is used to show toast top right of the screen 17 | TOP_RIGHT, 18 | 19 | /// [GFToastPosition.BOTTOM_LEFT] is used to show toast bottom left of the screen 20 | BOTTOM_LEFT, 21 | 22 | /// [GFToastPosition.BOTTOM_RIGHT] is used to show toast bottom right of the screen 23 | BOTTOM_RIGHT, 24 | 25 | /// [GFToastPosition.CENTER_LEFT] is used to show toast center left of the screen 26 | CENTER_LEFT, 27 | 28 | /// [GFToastPosition.CENTER_RIGHT] is used to show toast center right of the screen 29 | CENTER_RIGHT, 30 | } 31 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - url_launcher (0.0.1): 4 | - Flutter 5 | - url_launcher_macos (0.0.1): 6 | - Flutter 7 | - url_launcher_web (0.0.1): 8 | - Flutter 9 | 10 | DEPENDENCIES: 11 | - Flutter (from `Flutter`) 12 | - url_launcher (from `.symlinks/plugins/url_launcher/ios`) 13 | - url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`) 14 | - url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`) 15 | 16 | EXTERNAL SOURCES: 17 | Flutter: 18 | :path: Flutter 19 | url_launcher: 20 | :path: ".symlinks/plugins/url_launcher/ios" 21 | url_launcher_macos: 22 | :path: ".symlinks/plugins/url_launcher_macos/ios" 23 | url_launcher_web: 24 | :path: ".symlinks/plugins/url_launcher_web/ios" 25 | 26 | SPEC CHECKSUMS: 27 | Flutter: 0e3d915762c693b495b44d77113d4970485de6ec 28 | url_launcher: a1c0cc845906122c4784c542523d8cacbded5626 29 | url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313 30 | url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c 31 | 32 | PODFILE CHECKSUM: 1b66dae606f75376c5f2135a8290850eeb09ae83 33 | 34 | COCOAPODS: 1.8.4 35 | -------------------------------------------------------------------------------- /lib/position/gf_badge_position.dart: -------------------------------------------------------------------------------- 1 | /// [GFBadgePosition] is used to position the badges to top start, top bottom, 2 | /// bottom start or bottom end of the icon button 3 | /// See GFIconBadge 4 | 5 | class GFBadgePosition { 6 | const GFBadgePosition({this.top, this.end, this.bottom, this.start}); 7 | 8 | factory GFBadgePosition.topStart({double top = -5, double start = -10}) => 9 | GFBadgePosition(top: top, start: start); 10 | 11 | factory GFBadgePosition.topEnd({double top = -8, double end = -10}) => 12 | GFBadgePosition(top: top, end: end); 13 | 14 | factory GFBadgePosition.bottomEnd({double bottom = -8, double end = -10}) => 15 | GFBadgePosition(bottom: bottom, end: end); 16 | 17 | factory GFBadgePosition.bottomStart( 18 | {double bottom = -8, double start = -10}) => 19 | GFBadgePosition(bottom: bottom, start: start); 20 | 21 | /// defines the position of badge 22 | final double? top; 23 | 24 | /// defines the position of badge 25 | final double? end; 26 | 27 | /// defines the position of badge 28 | final double? start; 29 | 30 | /// defines the position of badge 31 | final double? bottom; 32 | } 33 | -------------------------------------------------------------------------------- /lib/colors/gf_luxury_color.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GFLuxuryColors { 4 | /// ✨ Gold Theme: Prestige, wealth, warmth 5 | static const Color GOLD = Color(0xFFFFD700); // Classic Gold 6 | static const Color ROSE_GOLD = Color(0xFFB76E79); // Rose Gold 7 | static const Color CHAMPAGNE_GOLD = Color(0xFFF7E7CE); // Champagne Gold 8 | 9 | /// 💎 Silver Theme: Sleek, modern, minimal 10 | static const Color SILVER = Color(0xFFC0C0C0); // Silver 11 | static const Color METALLIC_SILVER = Color(0xFFB0B0B0); // Steel Silver 12 | static const Color LIGHT_SILVER = Color(0xFFE0E0E0); // Soft Silver 13 | 14 | /// 🪙 Platinum Theme: Prestige, exclusivity 15 | static const Color PLATINUM = Color(0xFFE5E4E2); // Standard Platinum 16 | static const Color PLATINUM_GREY = Color(0xFFB2BEB5); // Industrial Platinum 17 | static const Color PEARL_WHITE = Color(0xFFFFFDF0); // Elegant Pearl 18 | 19 | /// Optional: Background or accent 20 | static const Color BLACK_LUX = Color(0xFF121212); // Deep black for contrast 21 | static const Color WHITE_LUX = Color(0xFFFFFFFF); // Clean white 22 | 23 | } 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2020 Flutter Author. 4 | 5 | Copyright (c) 2020 GetWidget. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /example/macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /example/windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Disable Windows macros that collide with C++ standard library functions. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 25 | 26 | # Add dependency libraries and include directories. Add any application-specific 27 | # dependencies here. 28 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 29 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 30 | 31 | # Run the Flutter tool portions of the build. This must not be removed. 32 | add_dependencies(${BINARY_NAME} flutter_assemble) 33 | -------------------------------------------------------------------------------- /lib/colors/gf_food_color.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GFFoodColors { 4 | /// ☕ Coffee Theme: Warm, earthy, comforting 5 | static const Color COFFEE_BROWN = Color(0xFF4E342E); // Espresso 6 | static const Color COFFEE_BEIGE = Color(0xFFD7CCC8); // Cappuccino Cream 7 | static const Color COFFEE_CARAMEL = Color(0xFFBCAAA4); // Caramel 8 | static const Color COFFEE_MOCHA = Color(0xFF6D4C41); // Mocha 9 | static const Color COFFEE_DARK = Color(0xFF3E2723); // Dark Roast 10 | 11 | /// 🍓 Berry Theme: Vibrant, fresh, fruity 12 | static const Color BERRY_RED = Color(0xFFC2185B); // Raspberry 13 | static const Color BERRY_PURPLE = Color(0xFF7B1FA2); // Blackberry 14 | static const Color BERRY_PINK = Color(0xFFF06292); // Strawberry 15 | static const Color BERRY_BLUE = Color(0xFF3949AB); // Blueberry 16 | static const Color BERRY_LIGHT = Color(0xFFF8BBD0); // Yogurt Pink 17 | 18 | /// 🍋 Citrus Theme: Zesty, bright, energetic 19 | static const Color CITRUS_ORANGE = Color(0xFFFF9800); // Orange 20 | static const Color CITRUS_YELLOW = Color(0xFFFFEB3B); // Lemon 21 | static const Color CITRUS_LIME = Color(0xFFCDDC39); // Lime 22 | static const Color CITRUS_GREEN = Color(0xFF8BC34A); // Citrus Leaf 23 | static const Color CITRUS_PEACH = Color(0xFFFFCC80); // Peach 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Flutter/ephemeral/flutter_lldb_helper.py: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | import lldb 6 | 7 | def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict): 8 | """Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages.""" 9 | base = frame.register["x0"].GetValueAsAddress() 10 | page_len = frame.register["x1"].GetValueAsUnsigned() 11 | 12 | # Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the 13 | # first page to see if handled it correctly. This makes diagnosing 14 | # misconfiguration (e.g. missing breakpoint) easier. 15 | data = bytearray(page_len) 16 | data[0:8] = b'IHELPED!' 17 | 18 | error = lldb.SBError() 19 | frame.GetThread().GetProcess().WriteMemory(base, data, error) 20 | if not error.Success(): 21 | print(f'Failed to write into {base}[+{page_len}]', error) 22 | return 23 | 24 | def __lldb_init_module(debugger: lldb.SBDebugger, _): 25 | target = debugger.GetDummyTarget() 26 | # Caveat: must use BreakpointCreateByRegEx here and not 27 | # BreakpointCreateByName. For some reasons callback function does not 28 | # get carried over from dummy target for the later. 29 | bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$") 30 | bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__)) 31 | bp.SetAutoContinue(True) 32 | print("-- LLDB integration loaded --") 33 | -------------------------------------------------------------------------------- /lib/colors/gf_element_color.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GFElementColors { 4 | /// 🌊 Water Element: Soothing, intuitive, emotional 5 | static const Color WATER_BLUE = Color(0xFF0288D1); // Ocean Blue 6 | static const Color WATER_TURQUOISE = Color(0xFF00BCD4); // Turquoise 7 | static const Color WATER_NAVY = Color(0xFF01579B); // Deep Sea 8 | static const Color WATER_WHITE = Color(0xFFE1F5FE); // Sea Foam 9 | static const Color WATER_TEAL = Color(0xFF00695C); // Teal Depth 10 | 11 | /// 🔥 Fire Element: Passionate, dynamic, energizing 12 | static const Color FIRE_RED = Color(0xFFD32F2F); // Blaze Red 13 | static const Color FIRE_ORANGE = Color(0xFFFF5722); // Ember Orange 14 | static const Color FIRE_YELLOW = Color(0xFFFFC107); // Spark Yellow 15 | static const Color FIRE_MAGENTA = Color(0xFFD81B60); // Intense Magenta 16 | static const Color FIRE_BLACK = Color(0xFF3E2723); // Charcoal Ash 17 | 18 | /// 💨 Air Element: Free-flowing, intellectual, creative 19 | static const Color AIR_SKY = Color(0xFF81D4FA); // Sky Blue 20 | static const Color AIR_GREY = Color(0xFFCFD8DC); // Cloud Grey 21 | static const Color AIR_WHITE = Color(0xFFFFFFFF); // Breeze White 22 | static const Color AIR_MINT = Color(0xFFB2EBF2); // Fresh Mint 23 | static const Color AIR_BEIGE = Color(0xFFFFF8E1); // Light Air 24 | 25 | } 26 | -------------------------------------------------------------------------------- /example/windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.CreateAndShow(L"example", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /example/macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.11' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | end 35 | 36 | post_install do |installer| 37 | installer.pods_project.targets.each do |target| 38 | flutter_additional_macos_build_settings(target) 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /lib/colors/gf_emotion_color.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GFEmotionColors { 4 | // Calm palette: Use for tranquil and soft interfaces (e.g., meditation, wellness apps) 5 | static const Color CALM_BLUE = Color(0xFFB3E5FC); // Soft Blue 6 | static const Color CALM_GREEN = Color(0xFFC8E6C9); // Pale Mint 7 | static const Color CALM_PURPLE = Color(0xFFE1BEE7); // Light Lavender 8 | static const Color CALM_GREY = Color(0xFFF5F5F5); // Mist Grey 9 | static const Color CALM_WHITE = Color(0xFFFFFFFF); // Pure White 10 | 11 | // Energetic palette: Use for action-oriented or youth-centric designs (e.g., fitness, games) 12 | static const Color ENERGETIC_RED = Color(0xFFFF5252); // Bright Red 13 | static const Color ENERGETIC_ORANGE = Color(0xFFFFA726); // Bold Orange 14 | static const Color ENERGETIC_YELLOW = Color(0xFFFFEB3B); // Vivid Yellow 15 | static const Color ENERGETIC_LIME = Color(0xFFCDDC39); // Lime 16 | static const Color ENERGETIC_PINK = Color(0xFFF06292); // Punch Pink 17 | 18 | // Serious palette: Use for professional, legal, medical, or banking interfaces 19 | static const Color SERIOUS_NAVY = Color(0xFF283593); // Deep Navy 20 | static const Color SERIOUS_BLACK = Color(0xFF212121); // Almost Black 21 | static const Color SERIOUS_GREY = Color(0xFF757575); // Medium Grey 22 | static const Color SERIOUS_TEAL = Color(0xFF00796B); // Conservative Teal 23 | static const Color SERIOUS_MAROON = Color(0xFF6A1B9A); // Royal Maroon 24 | 25 | } 26 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/colors/gf_space_color.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GFSpaceColors { 4 | /// 🌌 Galactic Backgrounds 5 | static const Color COSMIC_BLACK = Color(0xFF0B0C10); // Deep space black 6 | static const Color NEBULA_PURPLE = Color(0xFF6A0DAD); // Interstellar clouds 7 | static const Color STARFIELD = Color(0xFF1C1C3A); // Starfield night 8 | 9 | /// 🌠 Light Sources & Effects 10 | static const Color STELLAR_YELLOW = Color(0xFFFFD700); // Sunlight, stars 11 | static const Color SUPERNOVA_ORANGE = Color(0xFFFF6F00); // Exploding stars 12 | static const Color PULSAR_BLUE = Color(0xFF3D5AFE); // Energetic pulsar beams 13 | 14 | /// 🪐 Planetary Tones 15 | static const Color MARS_RED = Color(0xFFB22222); // Mars surface 16 | static const Color EARTH_BLUE = Color(0xFF1E88E5); // Earth’s ocean 17 | static const Color VENUS_GOLD = Color(0xFFE6C229); // Venus atmosphere 18 | static const Color JUPITER_BRONZE = Color(0xFF8B5E3C); // Jupiter bands 19 | static const Color SATURN_BEIGE = Color(0xFFD6A77A); // Saturn rings 20 | static const Color NEPTUNE_NAVY = Color(0xFF2C387E); // Neptune deep blue 21 | static const Color URANUS_ICE = Color(0xFF76D7EA); // Uranus pale cyan 22 | static const Color MOON_GRAY = Color(0xFFBDBDBD); // Moon dust 23 | 24 | /// 🌌 Miscellaneous 25 | static const Color AURORA_GREEN = Color(0xFF00FFB3); // Aurora Borealis 26 | static const Color DARK_MATTER = Color(0xFF121212); // Invisible form 27 | static const Color COMET_TAIL = Color(0xFFE1F5FE); // Ice trail 28 | 29 | } 30 | -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /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 | GetWidget 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/assets/github.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 14 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /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: ee4e09cce01d6f2d7f4baebd247fde02e5008851 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: ee4e09cce01d6f2d7f4baebd247fde02e5008851 17 | base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 18 | - platform: android 19 | create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 20 | base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 21 | - platform: ios 22 | create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 23 | base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 24 | - platform: linux 25 | create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 26 | base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 27 | - platform: macos 28 | create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 29 | base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 30 | - platform: web 31 | create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 32 | base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 33 | - platform: windows 34 | create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 35 | base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | id 'kotlin-android' 4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. 5 | id 'dev.flutter.flutter-gradle-plugin' 6 | } 7 | 8 | 9 | def localProperties = new Properties() 10 | def localPropertiesFile = rootProject.file('local.properties') 11 | if (localPropertiesFile.exists()) { 12 | localProperties.load(new FileInputStream(localPropertiesFile)) 13 | } 14 | 15 | android { 16 | compileSdkVersion flutter.compileSdkVersion 17 | namespace = 'com.ionicfirebaseapp.getwidget_example' 18 | 19 | compileOptions { 20 | sourceCompatibility JavaVersion.VERSION_21 21 | targetCompatibility JavaVersion.VERSION_21 22 | } 23 | 24 | kotlinOptions { 25 | jvmTarget = '21' 26 | } 27 | 28 | sourceSets { 29 | main.java.srcDirs += 'src/main/kotlin' 30 | } 31 | 32 | defaultConfig { 33 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 34 | applicationId "com.ionicfirebaseapp.getwidget_example" 35 | // You can update the following values to match your application needs. 36 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 37 | minSdkVersion 21 38 | targetSdkVersion flutter.targetSdkVersion 39 | versionCode = flutter.versionCode 40 | versionName = flutter.versionName 41 | } 42 | 43 | buildTypes { 44 | release { 45 | // TODO: Add your own signing config for the release build. 46 | // Signing with the debug keys for now, so `flutter run --release` works. 47 | signingConfig signingConfigs.debug 48 | } 49 | } 50 | } 51 | 52 | flutter { 53 | source '../..' 54 | } 55 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | .vscode 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | .dart_tool/ 27 | .flutter-plugins 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | build/ 32 | web/ 33 | .fvm/ 34 | getwidget-app-kit 35 | getwidget-web-kit 36 | getwidget_app 37 | test/.test_coverage.dart 38 | 39 | # Android related 40 | **/android/**/gradle-wrapper.jar 41 | **/android/.gradle 42 | **/android/captures/ 43 | **/android/gradlew 44 | **/android/gradlew.bat 45 | **/android/local.properties 46 | **/android/**/GeneratedPluginRegistrant.java 47 | 48 | # iOS/XCode related 49 | **/ios/**/*.mode1v3 50 | **/ios/**/*.mode2v3 51 | **/ios/**/*.moved-aside 52 | **/ios/**/*.pbxuser 53 | **/ios/**/*.perspectivev3 54 | **/ios/**/*sync/ 55 | **/ios/**/.sconsign.dblite 56 | **/ios/**/.tags* 57 | **/ios/**/.vagrant/ 58 | **/ios/**/DerivedData/ 59 | **/ios/**/Icon? 60 | **/ios/**/Pods/ 61 | **/ios/**/.symlinks/ 62 | **/ios/**/profile 63 | **/ios/**/xcuserdata 64 | **/ios/.generated/ 65 | **/ios/Flutter/App.framework 66 | **/ios/Flutter/Flutter.framework 67 | **/ios/Flutter/Generated.xcconfig 68 | **/ios/Flutter/app.flx 69 | **/ios/Flutter/app.zip 70 | **/ios/Flutter/flutter_assets/ 71 | **/ios/Flutter/flutter_export_environment.sh 72 | **/ios/ServiceDefinitions.json 73 | **/ios/Runner/GeneratedPluginRegistrant.* 74 | 75 | # Exceptions to above rules. 76 | !**/ios/**/default.mode1v3 77 | !**/ios/**/default.mode2v3 78 | !**/ios/**/default.pbxuser 79 | !**/ios/**/default.perspectivev3 80 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 81 | -------------------------------------------------------------------------------- /lib/components/form/form_field/widgets/providers/gf_multichipselectionprovider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ChipData { 4 | ChipData({required this.text, required this.selected}); 5 | String text; 6 | bool selected; 7 | } 8 | 9 | class GfMultiChipSelectData extends ChangeNotifier { 10 | GfMultiChipSelectData( 11 | {required this.values, 12 | this.lableStyle, 13 | this.selectedColor, 14 | this.unselectedColor, 15 | this.preselected}) { 16 | if (preselected != null) { 17 | for (int xb = 0; xb < values.length; xb++) { 18 | if (preselected!.contains(xb)) { 19 | chipsdata.add(ChipData(text: values[xb], selected: true)); 20 | } else { 21 | chipsdata.add(ChipData(text: values[xb], selected: false)); 22 | } 23 | } 24 | } else { 25 | chipsdata = 26 | values.map((e) => ChipData(text: e, selected: false)).toList(); 27 | } 28 | } 29 | final List values; 30 | List chipsdata = []; 31 | TextStyle? lableStyle; 32 | Color? selectedColor; 33 | Color? unselectedColor; 34 | List? preselected; 35 | 36 | List getlist() => chipsdata; 37 | 38 | Future onSelected({required int index, required bool value}) async { 39 | chipsdata[index].selected = value; 40 | notifyListeners(); 41 | } 42 | 43 | List getlistselected() { 44 | final List checked = []; 45 | final List xt = 46 | chipsdata.where((element) => element.selected).toList(); 47 | for (var element in xt) { 48 | checked.add(element.text); 49 | } 50 | return checked; 51 | } 52 | 53 | // list.asMap().forEach((index, item) 54 | List getlistselectedindx() { 55 | final List checked = []; 56 | chipsdata.asMap().forEach((index, item) { 57 | if (item.selected) { 58 | checked.add(index); 59 | } 60 | }); 61 | return checked; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /example/windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr); 51 | std::string utf8_string; 52 | if (target_length == 0 || target_length > utf8_string.max_size()) { 53 | return utf8_string; 54 | } 55 | utf8_string.resize(target_length); 56 | int converted_length = ::WideCharToMultiByte( 57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 58 | -1, utf8_string.data(), 59 | target_length, nullptr, nullptr); 60 | if (converted_length == 0) { 61 | return std::string(); 62 | } 63 | return utf8_string; 64 | } 65 | -------------------------------------------------------------------------------- /lib/components/form/form_field/widgets/providers/gf_multicheckboxselectionprovider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CheckboxData { 4 | CheckboxData({required this.text, required this.selected}); 5 | String text; 6 | bool selected; 7 | } 8 | 9 | class GfMultiCheckboxData extends ChangeNotifier { 10 | GfMultiCheckboxData( 11 | {required this.values, 12 | this.lableStyle, 13 | this.selectedColor, 14 | this.unselectedColor, 15 | this.preselected}) { 16 | if (preselected != null) { 17 | for (int xb = 0; xb < values.length; xb++) { 18 | if (preselected!.contains(xb)) { 19 | checkboxdata.add(CheckboxData(text: values[xb], selected: true)); 20 | } else { 21 | checkboxdata.add(CheckboxData(text: values[xb], selected: false)); 22 | } 23 | } 24 | } else { 25 | checkboxdata = 26 | values.map((e) => CheckboxData(text: e, selected: false)).toList(); 27 | } 28 | } 29 | final List values; 30 | List checkboxdata = []; 31 | TextStyle? lableStyle; 32 | Color? selectedColor; 33 | Color? unselectedColor; 34 | List? preselected; 35 | 36 | List getlist() => checkboxdata; 37 | List getlistselected() { 38 | final List checked = []; 39 | final List xt = 40 | checkboxdata.where((element) => element.selected).toList(); 41 | for (var element in xt) { 42 | checked.add(element.text); 43 | } 44 | return checked; 45 | } 46 | 47 | // list.asMap().forEach((index, item) 48 | List getlistselectedindx() { 49 | final List checked = []; 50 | checkboxdata.asMap().forEach((index, item) { 51 | if (item.selected) { 52 | checked.add(index); 53 | } 54 | }); 55 | return checked; 56 | } 57 | 58 | Future onSelected({required int index, required bool value}) async { 59 | checkboxdata[index].selected = value; 60 | notifyListeners(); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /example/windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | return true; 30 | } 31 | 32 | void FlutterWindow::OnDestroy() { 33 | if (flutter_controller_) { 34 | flutter_controller_ = nullptr; 35 | } 36 | 37 | Win32Window::OnDestroy(); 38 | } 39 | 40 | LRESULT 41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 42 | WPARAM const wparam, 43 | LPARAM const lparam) noexcept { 44 | // Give Flutter, including plugins, an opportunity to handle window messages. 45 | if (flutter_controller_) { 46 | std::optional result = 47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 48 | lparam); 49 | if (result) { 50 | return *result; 51 | } 52 | } 53 | 54 | switch (message) { 55 | case WM_FONTCHANGE: 56 | flutter_controller_->engine()->ReloadSystemFonts(); 57 | break; 58 | } 59 | 60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 61 | } 62 | -------------------------------------------------------------------------------- /lib/components/badge/gf_icon_badge.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:getwidget/getwidget.dart'; 3 | 4 | class GFIconBadge extends StatefulWidget { 5 | /// Create badges of all types, check out [GFBadge] for button badges and [GFIconBadge] for icon badges. 6 | const GFIconBadge( 7 | {Key? key, 8 | this.padding = const EdgeInsets.symmetric(horizontal: 8), 9 | required this.child, 10 | required this.counterChild, 11 | this.position}) 12 | : super(key: key); 13 | 14 | /// child of type [Widget] is used to show icon. 15 | /// Use [GFIconButton] widget for compatibility. 16 | final Widget child; 17 | 18 | /// widget of type [Widget] is used to show counter to the top right corner of child. 19 | /// You can use [GFBadge] for compatibility. 20 | final Widget counterChild; 21 | 22 | /// The internal padding for the badge's [child]. 23 | final EdgeInsetsGeometry padding; 24 | 25 | /// defines the position of [GFBadge]. 26 | final GFBadgePosition? position; 27 | 28 | @override 29 | _GFIconBadgeState createState() => _GFIconBadgeState(); 30 | } 31 | 32 | class _GFIconBadgeState extends State { 33 | @override 34 | Widget build(BuildContext context) => Container( 35 | padding: widget.padding, 36 | child: Stack( 37 | fit: StackFit.loose, 38 | alignment: Alignment.center, 39 | clipBehavior: Clip.none, 40 | children: [ 41 | widget.child, 42 | widget.position == null 43 | ? PositionedDirectional( 44 | top: GFBadgePosition.topEnd().top, 45 | end: GFBadgePosition.topEnd().end, 46 | child: widget.counterChild, 47 | ) 48 | : PositionedDirectional( 49 | top: widget.position!.top, 50 | end: widget.position!.end, 51 | bottom: widget.position!.bottom, 52 | start: widget.position!.start, 53 | child: widget.counterChild, 54 | ) 55 | ], 56 | )); 57 | } 58 | -------------------------------------------------------------------------------- /lib/colors/gf_social_color.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GFSocialColors { 4 | // Meta & Messaging 5 | static const Color WHATSAPP = Color(0xff25D366); 6 | static const Color FACEBOOK = Color(0xff4267B2); 7 | static const Color MESSENGER = Color(0xff0084FF); 8 | static const Color TELEGRAM = Color(0xff0088cc); 9 | static const Color WECHAT = Color(0xff09B83E); 10 | static const Color LINE = Color(0xff00B900); 11 | static const Color DISCORD = Color(0xff5865F2); 12 | static const Color SIGNAL = Color(0xff3A76F0); 13 | 14 | // Google Ecosystem 15 | static const Color GOOGLE = Color(0xffDB4437); 16 | static const Color YOUTUBE = Color(0xffFF0000); 17 | static const Color GMAIL = Color(0xffD14836); 18 | static const Color GOOGLE_DRIVE = Color(0xff0F9D58); 19 | static const Color GOOGLE_MAPS = Color(0xff4285F4); 20 | 21 | // Microblogging & Forums 22 | static const Color TWITTER = Color(0xff1DA1F2); 23 | static const Color REDDIT = Color(0xffFF4500); 24 | static const Color TUMBLR = Color(0xff35465C); 25 | static const Color BLUESKY = Color(0xff0066FF); 26 | 27 | // Professional & Creative 28 | static const Color LINKEDIN = Color(0xff0077b5); 29 | static const Color DRIBBLE = Color(0xffea4c89); 30 | static const Color BEHANCE = Color(0xff1769ff); 31 | static const Color MEDIUM = Color(0xff00ab6c); 32 | static const Color GITHUB = Color(0xff333333); 33 | static const Color STACKOVERFLOW = Color(0xfff48024); 34 | static const Color DEVTO = Color(0xff0A0A0A); 35 | 36 | // Visual & Entertainment 37 | static const Color PINTEREST = Color(0xffE60023); 38 | static const Color TIKTOK = Color(0xff010101); 39 | static const Color SNAPCHAT = Color(0xffFFFC00); 40 | static const Color TWITCH = Color(0xff6441A4); 41 | static const Color SPOTIFY = Color(0xff1DB954); 42 | static const Color NETFLIX = Color(0xffE50914); 43 | 44 | // Workspace Tools 45 | static const Color SLACK = Color(0xff2EB67D); 46 | static const Color ZOOM = Color(0xff2D8CFF); 47 | static const Color SKYPE = Color(0xff00AFF0); 48 | static const Color MICROSOFT_TEAMS = Color(0xff464EB8); 49 | } 50 | -------------------------------------------------------------------------------- /lib/colors/gf_kids_education_color.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GFKidsEducationColors { 4 | // 🎨 Primary Vibrant Colors 5 | static const Color SUNNY_YELLOW = Color(0xFFFFEB3B); // Happiness & focus 6 | static const Color SKY_BLUE = Color(0xFF81D4FA); // Calm, focus 7 | static const Color GRASS_GREEN = Color(0xFF81C784); // Growth, balance 8 | static const Color BUBBLEGUM_PINK = Color(0xFFF48FB1); // Fun, friendliness 9 | static const Color TANGERINE_ORANGE = Color(0xFFFFB74D); // Energy, warmth 10 | static const Color CANDY_PURPLE = Color(0xFFBA68C8); // Imagination 11 | 12 | // 🧩 Learning Accent Colors 13 | static const Color CRAYON_RED = Color(0xFFE57373); // Alertness 14 | static const Color MINT_GREEN = Color(0xFFB2DFDB); // Freshness 15 | static const Color PUZZLE_BLUE = Color(0xFF64B5F6); // Cognitive trigger 16 | static const Color BLOCK_BROWN = Color(0xFFA1887F); // Stability 17 | 18 | // 🌈 Themed Neutrals for Balance 19 | static const Color CHALK_WHITE = Color(0xFFFFFDE7); // Light background 20 | static const Color BOARD_BLACK = Color(0xFF2E2E2E); // Text contrast 21 | static const Color PENCIL_GRAY = Color(0xFFBDBDBD); // Icons/lines 22 | 23 | // 🍭 Special Fun Colors 24 | static const Color LEGO_RED = Color(0xFFD32F2F); // Playful blocks 25 | static const Color SLIME_GREEN = Color(0xFF66BB6A); // Playfulness 26 | static const Color MAGIC_PURPLE = Color(0xFF9575CD); // Creativity 27 | 28 | // 📚 Utility Groupings 29 | static const List vibrantSet = [ 30 | SUNNY_YELLOW, 31 | SKY_BLUE, 32 | GRASS_GREEN, 33 | BUBBLEGUM_PINK, 34 | TANGERINE_ORANGE, 35 | CANDY_PURPLE, 36 | ]; 37 | 38 | static const List learningSet = [ 39 | CRAYON_RED, 40 | PUZZLE_BLUE, 41 | MINT_GREEN, 42 | BLOCK_BROWN, 43 | ]; 44 | 45 | static const List neutralSet = [ 46 | CHALK_WHITE, 47 | BOARD_BLACK, 48 | PENCIL_GRAY, 49 | ]; 50 | 51 | static const List funSet = [ 52 | LEGO_RED, 53 | SLIME_GREEN, 54 | MAGIC_PURPLE, 55 | ]; 56 | 57 | } 58 | -------------------------------------------------------------------------------- /lib/colors/gf_medical_healthcare_color.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GFMedicalHealthcareColors { 4 | // 🔷 Primary Healthcare Colors 5 | static const Color MEDICAL_BLUE = Color(0xFF1976D2); // Trust, reliability 6 | static const Color HOSPITAL_WHITE = Color(0xFFF1F8FF); // Clean, sterile 7 | static const Color SCRUB_GREEN = Color(0xFF388E3C); // Healing, balance 8 | static const Color HEALTH_TEAL = Color(0xFF00796B); // Calm, reassurance 9 | 10 | // 🌡️ Alert & Status Colors 11 | static const Color ALERT_RED = Color(0xFFD32F2F); // Urgency, alerts 12 | static const Color WARNING_ORANGE = Color(0xFFF57C00); // Caution 13 | static const Color STABLE_YELLOW = Color(0xFFFFF176); // Monitoring 14 | static const Color CRITICAL_PURPLE = Color(0xFF7E57C2); // Diagnostic 15 | 16 | // 🩺 Neutral & Functional Colors 17 | static const Color DOCTOR_GRAY = Color(0xFF757575); // Text & icons 18 | static const Color LAB_BACKGROUND = Color(0xFFF5F5F5); // Card/background 19 | static const Color PHARMA_SILVER = Color(0xFFE0E0E0); // Divider, border 20 | 21 | // 💊 Specialty Color Tags 22 | static const Color PEDIATRIC_PINK = Color(0xFFF8BBD0); // Kids healthcare 23 | static const Color DENTAL_BLUE = Color(0xFF64B5F6); // Dental theme 24 | static const Color SURGICAL_GREEN = Color(0xFF81C784); // Surgery theme 25 | static const Color WELLNESS_INDIGO = Color(0xFF5C6BC0); // Mental health 26 | 27 | // 🧬 Department Color Map 28 | static const Map departmentColors = { 29 | 'General': MEDICAL_BLUE, 30 | 'Emergency': ALERT_RED, 31 | 'Pediatrics': PEDIATRIC_PINK, 32 | 'Dental': DENTAL_BLUE, 33 | 'Surgery': SURGICAL_GREEN, 34 | 'MentalHealth': WELLNESS_INDIGO, 35 | 'Pharmacy': HEALTH_TEAL, 36 | 'Radiology': CRITICAL_PURPLE, 37 | }; 38 | 39 | // 🌈 Suggested UI Groupings 40 | static const List statusColors = [ 41 | ALERT_RED, 42 | WARNING_ORANGE, 43 | STABLE_YELLOW, 44 | CRITICAL_PURPLE, 45 | ]; 46 | 47 | static const List backgroundColors = [ 48 | HOSPITAL_WHITE, 49 | LAB_BACKGROUND, 50 | PHARMA_SILVER, 51 | ]; 52 | 53 | static const List specialtyColors = [ 54 | PEDIATRIC_PINK, 55 | DENTAL_BLUE, 56 | SURGICAL_GREEN, 57 | WELLNESS_INDIGO, 58 | ]; 59 | } 60 | -------------------------------------------------------------------------------- /lib/components/sticky_header/gf_sticky_header.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/widgets.dart'; 3 | import 'package:getwidget/getwidget.dart'; 4 | 5 | class GFStickyHeader extends MultiChildRenderObjectWidget { 6 | /// GF Sticky Header will the stick header at top when content is being scrolled. 7 | /// Place this widget inside a [ListView], [GridView], [CustomScrollView], [SingleChildScrollView] or similar. 8 | GFStickyHeader( 9 | {Key? key, 10 | required this.stickyContent, 11 | required this.content, 12 | this.direction = Axis.vertical, 13 | this.enableHeaderOverlap = false, 14 | this.callback, 15 | this.stickyContentPosition = GFPosition.start}) 16 | : super( 17 | key: key, 18 | children: stickyContentPosition == GFPosition.start && 19 | direction == Axis.horizontal 20 | ? [stickyContent, content] 21 | : stickyContentPosition == GFPosition.start && 22 | direction == Axis.vertical 23 | ? [content, stickyContent] 24 | : [content, stickyContent]); 25 | 26 | /// widget can be used to define [stickyContent]. 27 | final Widget stickyContent; 28 | 29 | /// widget can be used to define [content]. 30 | final Widget content; 31 | 32 | /// On state true, the [stickyContent] will overlap the [content]. 33 | /// Only works when direction is [Axis.vertical]. Default set to false. 34 | final bool enableHeaderOverlap; 35 | 36 | /// [GFPosition] allows to [stickyContentPosition] to stick at top in [Axis.vertical] and stick at start in [Axis.horizontal] 37 | /// Defaults to [GFPosition.start] 38 | final GFPosition stickyContentPosition; 39 | 40 | /// Allows to add custom stickyHeader stuck offset value 41 | final RenderGFStickyHeaderCallback? callback; 42 | 43 | /// [direction] allows children to align in vertical / horizontal way 44 | /// Defaults to [Axis.vertical] 45 | final Axis direction; 46 | 47 | @override 48 | RenderGFStickyHeader createRenderObject(BuildContext context) { 49 | final scrollable = Scrollable.of(context); 50 | return RenderGFStickyHeader( 51 | direction: direction, 52 | scrollable: scrollable, 53 | enableHeaderOverlap: enableHeaderOverlap, 54 | callback: callback, 55 | stickyContentPosition: stickyContentPosition, 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /test/icon_badge_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:getwidget/getwidget.dart'; 4 | 5 | void main() { 6 | const badge = GFBadge( 7 | child: Text('12'), 8 | ); 9 | const size = GFSize.SMALL; 10 | 11 | testWidgets('Disabled GF IconBadge can be constructed', (tester) async { 12 | const iconBadgeKey = Key('header'); 13 | 14 | final GFIconBadge iconBadge = GFIconBadge( 15 | counterChild: badge, 16 | child: GFIconButton( 17 | key: iconBadgeKey, 18 | onPressed: null, 19 | icon: const Icon( 20 | Icons.directions_bike_sharp, 21 | ), 22 | size: size, 23 | disabledColor: Colors.teal.shade300, 24 | ), 25 | ); 26 | 27 | final TestApp app = TestApp(iconBadge); 28 | 29 | await tester.pumpWidget(app); 30 | 31 | expect(find.byIcon(Icons.directions_bike_sharp), findsOneWidget); 32 | expect(find.byWidget(badge), findsOneWidget); 33 | expect(app.iconBadge.counterChild, badge); 34 | 35 | await tester.tap(find.byKey(iconBadgeKey)); 36 | await tester.pump(); 37 | 38 | await tester.pumpWidget(app); 39 | }); 40 | 41 | testWidgets('GF IconBadge can be constructed', (tester) async { 42 | const iconBadgeKey = Key('header'); 43 | 44 | final GFIconBadge iconBadge = GFIconBadge( 45 | counterChild: badge, 46 | child: GFIconButton( 47 | key: iconBadgeKey, 48 | onPressed: () {}, 49 | icon: const Icon( 50 | Icons.directions_bike_sharp, 51 | ), 52 | size: size, 53 | color: Colors.teal, 54 | ), 55 | ); 56 | 57 | final TestApp app = TestApp(iconBadge); 58 | 59 | await tester.pumpWidget(app); 60 | 61 | expect(find.byIcon(Icons.directions_bike_sharp), findsOneWidget); 62 | expect(find.byWidget(badge), findsOneWidget); 63 | expect(app.iconBadge.counterChild, badge); 64 | 65 | await tester.tap(find.byKey(iconBadgeKey)); 66 | await tester.pump(); 67 | 68 | await tester.pumpWidget(app); 69 | }); 70 | } 71 | 72 | class TestApp extends StatefulWidget { 73 | const TestApp(this.iconBadge); 74 | 75 | final GFIconBadge iconBadge; 76 | 77 | @override 78 | _TestAppState createState() => _TestAppState(); 79 | } 80 | 81 | class _TestAppState extends State { 82 | @override 83 | Widget build(BuildContext context) => MaterialApp( 84 | home: Scaffold( 85 | body: Column( 86 | children: [ 87 | widget.iconBadge, 88 | ], 89 | ), 90 | ), 91 | ); 92 | } 93 | -------------------------------------------------------------------------------- /lib/colors/gf_color.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GFColors { 4 | // Basic Theme Colors 5 | static const Color PRIMARY = Color(0xff3880FF); 6 | static const Color SECONDARY = Color(0xffAA66CC); 7 | static const Color SUCCESS = Color(0xff10DC60); 8 | static const Color INFO = Color(0xff33B5E5); 9 | static const Color WARNING = Color(0xffFFBB33); 10 | static const Color DANGER = Color(0xffF04141); 11 | 12 | // Light and Dark Variants 13 | static const Color LIGHT = Color(0xffE0E0E0); 14 | static const Color DARK = Color(0xff222428); 15 | static const Color WHITE = Color(0xffffffff); 16 | static const Color BLACK = Color(0xff000000); 17 | 18 | // Utility & Brand Colors 19 | static const Color FOCUS = Color(0xff434054); 20 | static const Color ALT = Color(0xff794c8a); 21 | static const Color DISABLED = Color(0xffBDBDBD); 22 | static const Color BACKGROUND = Color(0xffF4F5F8); 23 | static const Color TRANSPARENT = Colors.transparent; 24 | 25 | // Extended Color Palette 26 | static const Color NEUTRAL = Color(0xff9E9E9E); 27 | static const Color MUTED = Color(0xff757575); 28 | static const Color BRAND = Color(0xff6200EE); // GF branding support 29 | 30 | // MaterialColor Swatches for ThemeData.primarySwatch 31 | static const MaterialColor PRIMARY_SWATCH = MaterialColor( 32 | 0xff3880FF, 33 | { 34 | 50: Color(0xffe3f2fd), 35 | 100: Color(0xffbbdefb), 36 | 200: Color(0xff90caf9), 37 | 300: Color(0xff64b5f6), 38 | 400: Color(0xff42a5f5), 39 | 500: Color(0xff2196f3), 40 | 600: Color(0xff1e88e5), 41 | 700: Color(0xff1976d2), 42 | 800: Color(0xff1565c0), 43 | 900: Color(0xff0d47a1), 44 | }, 45 | ); 46 | 47 | static const MaterialColor SUCCESS_SWATCH = MaterialColor( 48 | 0xff10DC60, 49 | { 50 | 50: Color(0xffe6f7f0), 51 | 100: Color(0xffc0edd9), 52 | 200: Color(0xff99e2c2), 53 | 300: Color(0xff73d7aa), 54 | 400: Color(0xff4ccf93), 55 | 500: Color(0xff26c47b), 56 | 600: Color(0xff20a369), 57 | 700: Color(0xff1a8257), 58 | 800: Color(0xff146145), 59 | 900: Color(0xff0e4033), 60 | }, 61 | ); 62 | 63 | static const MaterialColor DANGER_SWATCH = MaterialColor( 64 | 0xffF04141, 65 | { 66 | 50: Color(0xfffdeaea), 67 | 100: Color(0xfff8bdbd), 68 | 200: Color(0xfff28f8f), 69 | 300: Color(0xffec6161), 70 | 400: Color(0xffe73333), 71 | 500: Color(0xffe10505), 72 | 600: Color(0xffb90404), 73 | 700: Color(0xff910303), 74 | 800: Color(0xff690202), 75 | 900: Color(0xff410101), 76 | }, 77 | ); 78 | } 79 | -------------------------------------------------------------------------------- /lib/components/sticky_header/gf_sticky_header_builder.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:getwidget/getwidget.dart'; 3 | 4 | typedef StickyHeaderWidgetBuilder = Widget Function( 5 | BuildContext context, 6 | double stuckValue, 7 | ); 8 | 9 | class GFStickyHeaderBuilder extends StatefulWidget { 10 | /// Place this widget inside a [ListView], [GridView], [CustomScrollView], [SingleChildScrollView] or similar. 11 | /// Constructs a new [GFStickyHeaderBuilder] widget. 12 | const GFStickyHeaderBuilder({ 13 | Key? key, 14 | required this.stickyContentBuilder, 15 | required this.content, 16 | this.direction = Axis.vertical, 17 | this.enableHeaderOverlap = false, 18 | this.callback, 19 | this.stickyContentPosition = GFPosition.start, 20 | }) : super(key: key); 21 | 22 | /// builder widget can be used to define [stickyContentBuilder]. 23 | final StickyHeaderWidgetBuilder stickyContentBuilder; 24 | 25 | /// widget can be used to define [content]. 26 | final Widget content; 27 | 28 | /// On state true, the [stickyContentBuilder] will overlap the [content]. 29 | /// Only works when direction is [Axis.vertical]. Default set to false. 30 | final bool enableHeaderOverlap; 31 | 32 | /// [GFPosition] allows to [stickyContentPosition] to stick at top in [Axis.vertical] and stick at start in [Axis.horizontal] 33 | /// Defaults to [GFPosition.start] 34 | final GFPosition stickyContentPosition; 35 | 36 | /// Allows to add custom stickyHeader stuck offset value 37 | final RenderGFStickyHeaderCallback? callback; 38 | 39 | /// [direction] allows children to align in vertical / horizontal way 40 | /// Defaults to [Axis.vertical] 41 | final Axis direction; 42 | 43 | @override 44 | _GFStickyHeaderBuilderState createState() => _GFStickyHeaderBuilderState(); 45 | } 46 | 47 | class _GFStickyHeaderBuilderState extends State { 48 | double? _stuckValue; 49 | 50 | @override 51 | Widget build(BuildContext context) => GFStickyHeader( 52 | enableHeaderOverlap: widget.enableHeaderOverlap, 53 | direction: widget.direction, 54 | stickyContentPosition: widget.stickyContentPosition, 55 | stickyContent: LayoutBuilder( 56 | builder: (context, _) => 57 | widget.stickyContentBuilder(context, _stuckValue ?? 0.0), 58 | ), 59 | content: widget.content, 60 | callback: (double stuckValue) { 61 | if (_stuckValue != stuckValue) { 62 | _stuckValue = stuckValue; 63 | WidgetsBinding.instance.endOfFrame.then((_) { 64 | if (mounted) { 65 | setState(() {}); 66 | } 67 | }); 68 | } 69 | }, 70 | ); 71 | } 72 | -------------------------------------------------------------------------------- /lib/components/border/gf_border.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:getwidget/components/border/gf_dashed_border.dart'; 3 | import 'package:getwidget/types/gf_border_type.dart'; 4 | 5 | class GFBorder extends StatelessWidget { 6 | /// Create different types of borders around given child widget 7 | GFBorder({ 8 | required this.child, 9 | this.color = Colors.black, 10 | this.strokeWidth = 1, 11 | this.type = GFBorderType.rect, 12 | this.dashedLine = const [3, 1], 13 | this.padding = const EdgeInsets.all(10), 14 | this.radius = const Radius.circular(0), 15 | // this.customPath, 16 | }) : assert(_isValidDashedLine(dashedLine), 'Invalid dash pattern'); 17 | 18 | /// child of type [Widget] which can be any component or text, etc 19 | final Widget child; 20 | 21 | /// padding for [child] where in padding is given to the border types 22 | final EdgeInsets padding; 23 | 24 | /// storkeWidth of type [double] which is used to define the thickness of the border 25 | final double strokeWidth; 26 | 27 | /// color of type [Color] or GFColor which is used to change the color of the border type 28 | final Color color; 29 | 30 | /// dashedLine of type [List] which is used for the linear and simple dashed line of border 31 | final List dashedLine; 32 | 33 | /// type of [GFBorderType] which is used to define the different types of borders ie, circle, Rect, RRect and oval 34 | final GFBorderType type; 35 | 36 | /// radius of type [Radius] used to give a curved border only when the border type is RRect, 37 | /// in other cases radius will not work 38 | final Radius radius; 39 | 40 | // /// customPath of type [PathBuilder] used for drawing the paths 41 | // final PathBuilder customPath; 42 | 43 | @override 44 | Widget build(BuildContext context) => Stack( 45 | alignment: AlignmentDirectional.center, 46 | children: [ 47 | Positioned.fill( 48 | child: CustomPaint( 49 | painter: DashedType( 50 | strokeWidth: strokeWidth, 51 | radius: radius, 52 | color: color, 53 | type: type, 54 | dashedLine: dashedLine, 55 | // customPath: customPath, 56 | ), 57 | ), 58 | ), 59 | Container(padding: padding, child: child), 60 | ], 61 | ); 62 | } 63 | 64 | /// the value of dashedLine cannot be 0 or null, it should have some definite and proper value 65 | bool _isValidDashedLine(List dash) { 66 | final Set _dashSet = dash.toSet(); 67 | 68 | if (_dashSet.length == 1 && _dashSet.elementAt(0) == 0.0) { 69 | return false; 70 | } 71 | if (_dashSet.isEmpty) { 72 | return false; 73 | } 74 | return true; 75 | } 76 | -------------------------------------------------------------------------------- /lib/components/floating_widget/gf_floating_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:getwidget/getwidget.dart'; 3 | 4 | class GFFloatingWidget extends StatefulWidget { 5 | /// Creates a Floating body can be used to display the quick messages, warning and erros. 6 | /// Inside floating widget [GFToast] can be used as body. See [GFToast] 7 | const GFFloatingWidget( 8 | {Key? key, 9 | this.child, 10 | this.horizontalPosition, 11 | this.verticalPosition, 12 | this.blurnessColor, 13 | this.showBlurness = false, 14 | this.body}) 15 | : super(key: key); 16 | 17 | ///child of type [Widget] which floats across the body based on horizontal and vertical position 18 | final Widget? child; 19 | 20 | ///body of type [Widget] which is same as Scaffold's body 21 | final Widget? body; 22 | 23 | /// horizontalPosition of type [double] which aligns the child horizontally across the body 24 | final double? horizontalPosition; 25 | 26 | /// verticalPosition of type [double] which aligns the child vertically across the body 27 | final double? verticalPosition; 28 | 29 | ///blurnessColor of tye [Color] or [GFColors] which is used to blur the backgroundColor when ever the [child] is used in [GFFloatingWidget] 30 | final Color? blurnessColor; 31 | 32 | ///type of bool which allows to show or hide the blurness of the backgroundColor whenever the [child] is used in [GFFloatingWidget] 33 | final bool showBlurness; 34 | 35 | @override 36 | _GFFloatingWidgetState createState() => _GFFloatingWidgetState(); 37 | } 38 | 39 | class _GFFloatingWidgetState extends State { 40 | Widget? child; 41 | 42 | @override 43 | void initState() { 44 | child = widget.child; 45 | super.initState(); 46 | } 47 | 48 | @override 49 | void didUpdateWidget(GFFloatingWidget oldWidget) { 50 | child = widget.child; 51 | super.didUpdateWidget(oldWidget); 52 | } 53 | 54 | @override 55 | Widget build(BuildContext context) => Stack( 56 | alignment: Alignment.center, 57 | fit: StackFit.loose, 58 | children: [ 59 | Container( 60 | height: MediaQuery.of(context).size.height, 61 | child: widget.body ?? Container(), 62 | ), 63 | Positioned( 64 | child: Container( 65 | height: MediaQuery.of(context).size.height, 66 | width: MediaQuery.of(context).size.width, 67 | color: widget.showBlurness 68 | ? widget.blurnessColor ?? Colors.black54 69 | : null, 70 | child: Stack( 71 | children: [ 72 | Positioned( 73 | top: widget.verticalPosition ?? 0.0, 74 | left: widget.horizontalPosition ?? 0.0, 75 | child: widget.child ?? Container(), 76 | ) 77 | ], 78 | ), 79 | ), 80 | ) 81 | ], 82 | ); 83 | } 84 | -------------------------------------------------------------------------------- /test/tabbarview_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:getwidget/getwidget.dart'; 4 | 5 | void main() { 6 | final Key tabBarViewKey = UniqueKey(); 7 | final List tabs = [ 8 | 'AAAAAA', 9 | 'BBBBBB', 10 | 'CCCCCC', 11 | 'DDDDDD', 12 | 'EEEEEE' 13 | ]; 14 | final List tabList = [ 15 | Text(tabs[0]), 16 | Text(tabs[1]), 17 | Text(tabs[2]), 18 | Text(tabs[3]), 19 | Text(tabs[4]) 20 | ]; 21 | 22 | testWidgets('GFTabBarView can be constructed', (tester) async { 23 | final TabController tabController = 24 | TabController(length: 3, initialIndex: 0, vsync: tester); 25 | 26 | final GFTabBarView tabBarView = 27 | GFTabBarView(controller: tabController, children: [ 28 | Container( 29 | child: const Text('aaa'), 30 | ), 31 | Container( 32 | child: const Text('bbb'), 33 | ), 34 | Container( 35 | child: const Text('ccc'), 36 | ), 37 | ]); 38 | 39 | final TestApp app = TestApp(tabBarView); 40 | await tester.pumpWidget(app); 41 | 42 | expect(find.text('aaa'), findsOneWidget); 43 | expect(find.text('bbb'), findsNothing); 44 | 45 | Offset point = tester.getCenter(find.text('aaa')); 46 | await tester.dragFrom(point, const Offset(-600, 0)); 47 | await tester.pump(); 48 | expect(find.text('bbb'), findsOneWidget); 49 | 50 | point = tester.getCenter(find.text('bbb')); 51 | await tester.dragFrom(point, const Offset(-600, 0)); 52 | await tester.pump(); 53 | expect(find.text('ccc'), findsOneWidget); 54 | 55 | point = tester.getCenter(find.text('ccc')); 56 | await tester.dragFrom(point, const Offset(600, 0)); 57 | await tester.pump(); 58 | expect(find.text('bbb'), findsOneWidget); 59 | }); 60 | 61 | testWidgets('GFTabBarView can be constructed with properties', 62 | (tester) async { 63 | final TabController tabController = 64 | TabController(length: tabList.length, initialIndex: 0, vsync: tester); 65 | 66 | final GFTabBarView tabBarView = GFTabBarView( 67 | key: tabBarViewKey, 68 | controller: tabController, 69 | children: tabList, 70 | height: 345, 71 | ); 72 | 73 | final TestApp app = TestApp(tabBarView); 74 | await tester.pumpWidget(app); 75 | 76 | expect(app.tabBarView.controller, tabController); 77 | expect(app.tabBarView.children, tabList); 78 | expect(app.tabBarView.height, 345); 79 | }); 80 | } 81 | 82 | class TestApp extends StatefulWidget { 83 | const TestApp(this.tabBarView); 84 | 85 | final GFTabBarView tabBarView; 86 | 87 | @override 88 | _TestAppState createState() => _TestAppState(); 89 | } 90 | 91 | class _TestAppState extends State { 92 | @override 93 | Widget build(BuildContext context) => MaterialApp( 94 | home: Scaffold( 95 | appBar: AppBar( 96 | title: const Text('TabBarView'), 97 | ), 98 | body: widget.tabBarView, 99 | ), 100 | ); 101 | } 102 | -------------------------------------------------------------------------------- /example/linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/components/form/gf_form_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:getwidget/components/form/form_field/widgets/providers/gf_datepickerprovider.dart'; 3 | import 'package:getwidget/components/form/form_field/widgets/providers/gf_formdropdownprovider.dart'; 4 | import 'package:getwidget/components/form/form_field/widgets/providers/gf_formfieldprovider.dart'; 5 | import 'package:getwidget/components/form/form_field/widgets/providers/gf_multicheckboxselectionprovider.dart'; 6 | import 'package:getwidget/components/form/form_field/widgets/providers/gf_multichipselectionprovider.dart'; 7 | import 'package:getwidget/components/form/form_field/widgets/providers/gf_questionbuttonprovider.dart'; 8 | import 'package:getwidget/components/form/form_field/widgets/providers/gf_radioprovider.dart'; 9 | import 'package:getwidget/components/form/form_field/widgets/providers/gf_timepickerprovider.dart'; 10 | 11 | class GfFormHandler extends ChangeNotifier { 12 | GfFormHandler({ 13 | required this.formsKey, 14 | }); 15 | final GlobalKey formsKey; 16 | List models = []; 17 | void getModels() => models; 18 | 19 | void setModel(ChangeNotifier modelx) { 20 | print('Adding Model ::${modelx.runtimeType}'); 21 | models.add(modelx); 22 | print('Model List ${models.length}'); 23 | } 24 | 25 | Future validateForm() async { 26 | if (formsKey.currentState!.validate()) { 27 | return true; 28 | } else { 29 | return false; 30 | } 31 | } 32 | 33 | Future> getFormValues() async { 34 | final List values = []; 35 | if (formsKey.currentState!.validate()) { 36 | for (ChangeNotifier xt in models) { 37 | switch (xt.runtimeType) { 38 | case GfFormFieldData: 39 | final GfFormFieldData jx = xt as GfFormFieldData; 40 | values.add(jx.getData()); 41 | break; 42 | case GfFormDropdownData: 43 | final GfFormDropdownData jx = xt as GfFormDropdownData; 44 | values.add(jx.getValue()); 45 | break; 46 | case GfGenderButtonData: 47 | final GfGenderButtonData jx = xt as GfGenderButtonData; 48 | values.add(jx.getValue()); 49 | break; 50 | case GfQuestionButtonData: 51 | final GfQuestionButtonData jx = xt as GfQuestionButtonData; 52 | values.add(jx.getValue()); 53 | break; 54 | case GfMultiCheckboxData: 55 | final GfMultiCheckboxData jx = xt as GfMultiCheckboxData; 56 | values.add(jx.getlistselectedindx()); 57 | break; 58 | case GfMultiChipSelectData: 59 | final GfMultiChipSelectData jx = xt as GfMultiChipSelectData; 60 | values.add(jx.getlistselectedindx()); 61 | break; 62 | case GfDatePickerData: 63 | final GfDatePickerData jx = xt as GfDatePickerData; 64 | values.add(jx.getDate()); 65 | break; 66 | case GfTimePickerData: 67 | final GfTimePickerData jx = xt as GfTimePickerData; 68 | values.add(jx.getTime()); 69 | break; 70 | } 71 | } 72 | } 73 | return values; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /test/shimmer_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:getwidget/getwidget.dart'; 4 | 5 | void main() { 6 | final childWidget = Container( 7 | width: 111, 8 | height: 222, 9 | ); 10 | const firstColor = Colors.teal; 11 | const secondColor = Colors.tealAccent; 12 | 13 | const count = 5; 14 | const duration = Duration(milliseconds: 3000); 15 | 16 | final gradient = LinearGradient( 17 | begin: Alignment.bottomRight, 18 | end: Alignment.centerLeft, 19 | stops: const [0, 0.3, 0.6, 0.9, 1], 20 | colors: [ 21 | Colors.teal[100]!, 22 | Colors.teal[200]!, 23 | Colors.teal[300]!, 24 | Colors.teal[400]!, 25 | Colors.teal[500]!, 26 | ], 27 | ); 28 | 29 | testWidgets('GF Shimmer can be constructed', (tester) async { 30 | // final childWidget = Icon(Icons.directions_bike_sharp, size: 45,); 31 | 32 | final GFShimmer shimmer = GFShimmer( 33 | child: childWidget, 34 | mainColor: firstColor, 35 | secondaryColor: secondColor, 36 | shimmerEffectCount: count, 37 | duration: duration, 38 | ); 39 | 40 | final TestApp app = TestApp(shimmer); 41 | 42 | await tester.pumpWidget(app); 43 | await tester.pump(duration); 44 | 45 | await tester.pumpWidget(Container(child: childWidget)); 46 | expect(find.byWidget(childWidget), findsOneWidget); 47 | }); 48 | 49 | testWidgets('GF Shimmer can be constructed with icon widget', (tester) async { 50 | const GFShimmer shimmer = GFShimmer( 51 | child: Icon( 52 | Icons.directions_bike_sharp, 53 | size: 45, 54 | ), 55 | mainColor: firstColor, 56 | secondaryColor: secondColor, 57 | shimmerEffectCount: count, 58 | ); 59 | 60 | const TestApp app = TestApp(shimmer); 61 | 62 | await tester.pumpWidget(app); 63 | 64 | expect(find.byIcon(Icons.directions_bike_sharp), findsOneWidget); 65 | }); 66 | 67 | test('should emit the right values for shimmerEffectCount', () async { 68 | final GFShimmer shimmer = GFShimmer( 69 | child: childWidget, 70 | mainColor: firstColor, 71 | secondaryColor: secondColor, 72 | shimmerEffectCount: count, 73 | ); 74 | expect(shimmer.shimmerEffectCount, count); 75 | }); 76 | 77 | test('GF Shimmer with gradient', () async { 78 | final GFShimmer shimmer = GFShimmer( 79 | child: childWidget, 80 | mainColor: firstColor, 81 | secondaryColor: secondColor, 82 | shimmerEffectCount: count, 83 | showGradient: true, 84 | gradient: gradient, 85 | ); 86 | expect(shimmer.showGradient, isTrue); 87 | expect(shimmer.gradient, gradient); 88 | }); 89 | } 90 | 91 | class TestApp extends StatefulWidget { 92 | const TestApp(this.shimmer); 93 | 94 | final GFShimmer shimmer; 95 | 96 | @override 97 | _TestAppState createState() => _TestAppState(); 98 | } 99 | 100 | class _TestAppState extends State { 101 | @override 102 | Widget build(BuildContext context) => MaterialApp( 103 | home: Scaffold( 104 | body: Column( 105 | children: [ 106 | widget.shimmer, 107 | ], 108 | ), 109 | ), 110 | ); 111 | } 112 | -------------------------------------------------------------------------------- /lib/components/image/gf_image_overlay.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /// Creates a image widget with shaded overlay. 4 | class GFImageOverlay extends StatelessWidget { 5 | /// Creates a image widget with shaded overlay. 6 | const GFImageOverlay({ 7 | Key? key, 8 | this.height, 9 | this.width, 10 | this.color, 11 | this.padding, 12 | this.margin, 13 | this.image, 14 | this.child = const Text(''), 15 | this.alignment, 16 | this.borderRadius, 17 | this.colorFilter = 18 | const ColorFilter.mode(Colors.black26, BlendMode.colorBurn), 19 | this.boxFit = BoxFit.fill, 20 | this.border, 21 | this.shape = BoxShape.rectangle, 22 | }) : super(key: key); 23 | 24 | /// define image's [double] height 25 | final double? height; 26 | 27 | /// define image's [double] width 28 | final double? width; 29 | 30 | /// The image background color. 31 | final Color? color; 32 | 33 | /// The empty space that surrounds the card. Defines the image's outer [Container.margin]. 34 | final EdgeInsetsGeometry? margin; 35 | 36 | /// The empty space that surrounds the card. Defines the image's outer [Container.padding].. 37 | final EdgeInsetsGeometry? padding; 38 | 39 | /// The [Image] widget used to display image 40 | final ImageProvider? image; 41 | 42 | /// The [child] contained by the container, used to display text over image 43 | final Widget child; 44 | 45 | /// Align the [child] within the container. 46 | final AlignmentGeometry? alignment; 47 | 48 | /// How the image should be inscribed into the box. 49 | /// The default is [BoxFit.scaleDown] if centerSlice is null, and 50 | /// [BoxFit.fill] if centerSlice is not null. 51 | final BoxFit? boxFit; 52 | 53 | /// A color filter to apply to the image before painting it. 54 | final ColorFilter? colorFilter; 55 | 56 | /// The corners of this [GFImageOverlay] are rounded by this [BorderRadius]. 57 | final BorderRadiusGeometry? borderRadius; 58 | 59 | /// A border to draw above the [GFImageOverlay]. 60 | final Border? border; 61 | 62 | /// The shape to fill the background [color], gradient, and [image] into and 63 | /// to cast as the boxShadow. 64 | /// 65 | /// If this is [BoxShape.circle] then [borderRadius] is ignored. 66 | /// 67 | /// The [shape] cannot be interpolated; animating bestuckValue two [BoxDecoration]s 68 | /// with different [shape]s will result in a discontinuity in the rendering. 69 | /// To interpolate bestuckValue two shapes, consider using [ShapeDecoration] and 70 | /// different [ShapeBorder]s; in particular, [CircleBorder] instead of 71 | /// [BoxShape.circle] and [RoundedRectangleBorder] instead of 72 | /// [BoxShape.rectangle]. 73 | /// 74 | /// {@macro flutter.painting.boxDecoration.clip} 75 | final BoxShape shape; 76 | 77 | @override 78 | Widget build(BuildContext context) => Container( 79 | alignment: alignment, 80 | height: height, 81 | width: width ?? MediaQuery.of(context).size.width, 82 | margin: margin, 83 | padding: padding, 84 | child: child, 85 | decoration: BoxDecoration( 86 | shape: shape, 87 | borderRadius: borderRadius, 88 | border: border, 89 | color: color, 90 | image: DecorationImage( 91 | fit: boxFit, 92 | colorFilter: colorFilter, 93 | image: image!, 94 | ), 95 | ), 96 | ); 97 | } 98 | -------------------------------------------------------------------------------- /example/windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #ifdef FLUTTER_BUILD_NUMBER 64 | #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0 67 | #endif 68 | 69 | #ifdef FLUTTER_BUILD_NAME 70 | #define VERSION_AS_STRING #FLUTTER_BUILD_NAME 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.example" "\0" 93 | VALUE "FileDescription", "example" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "example" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "example.exe" "\0" 98 | VALUE "ProductName", "example" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at info@ionicfirebaseapp.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /example/windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates and shows a win32 window with |title| and position and size using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size to will treat the width height passed in to this function 35 | // as logical pixels and scale to appropriate for the default monitor. Returns 36 | // true if the window was created successfully. 37 | bool CreateAndShow(const std::wstring& title, 38 | const Point& origin, 39 | const Size& size); 40 | 41 | // Release OS resources associated with window. 42 | void Destroy(); 43 | 44 | // Inserts |content| into the window tree. 45 | void SetChildContent(HWND content); 46 | 47 | // Returns the backing Window handle to enable clients to set icon and other 48 | // window properties. Returns nullptr if the window has been destroyed. 49 | HWND GetHandle(); 50 | 51 | // If true, closing this window will quit the application. 52 | void SetQuitOnClose(bool quit_on_close); 53 | 54 | // Return a RECT representing the bounds of the current client area. 55 | RECT GetClientArea(); 56 | 57 | protected: 58 | // Processes and route salient window messages for mouse handling, 59 | // size change and DPI. Delegates handling of these to member overloads that 60 | // inheriting classes can handle. 61 | virtual LRESULT MessageHandler(HWND window, 62 | UINT const message, 63 | WPARAM const wparam, 64 | LPARAM const lparam) noexcept; 65 | 66 | // Called when CreateAndShow is called, allowing subclass window-related 67 | // setup. Subclasses should return false if setup fails. 68 | virtual bool OnCreate(); 69 | 70 | // Called when Destroy is called. 71 | virtual void OnDestroy(); 72 | 73 | private: 74 | friend class WindowClassRegistrar; 75 | 76 | // OS callback called by message pump. Handles the WM_NCCREATE message which 77 | // is passed when the non-client area is being created and enables automatic 78 | // non-client DPI scaling so that the non-client area automatically 79 | // responsponds to changes in DPI. All other messages are handled by 80 | // MessageHandler. 81 | static LRESULT CALLBACK WndProc(HWND const window, 82 | UINT const message, 83 | WPARAM const wparam, 84 | LPARAM const lparam) noexcept; 85 | 86 | // Retrieves a class instance pointer for |window| 87 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 88 | 89 | bool quit_on_close_ = false; 90 | 91 | // window handle for top level window. 92 | HWND window_handle_ = nullptr; 93 | 94 | // window handle for hosted content. 95 | HWND child_content_ = nullptr; 96 | }; 97 | 98 | #endif // RUNNER_WIN32_WINDOW_H_ 99 | -------------------------------------------------------------------------------- /lib/components/form/form_field/decorations/gf_formfield_decoration.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:getwidget/shape/gf_textfield_shape.dart'; 3 | 4 | class GfFormFieldDecoration extends InputDecoration { 5 | const GfFormFieldDecoration( 6 | {required this.context, 7 | required this.shape, 8 | required this.bgfilled, 9 | this.bgcolor, 10 | this.editingBorderColor, 11 | this.idleBorderColor, 12 | this.borderRadius, 13 | this.textColor, 14 | this.radius, 15 | this.borderWidth, 16 | this.gfprefixIcon, 17 | this.hinttext, 18 | this.fieldPadding}); 19 | 20 | final Color? editingBorderColor; 21 | final Color? textColor; 22 | final double? radius; 23 | final GFTextFieldShape shape; 24 | final Color? idleBorderColor; 25 | final BuildContext context; 26 | final double? borderWidth; 27 | final Widget? gfprefixIcon; 28 | final double? borderRadius; 29 | final String? hinttext; 30 | final bool bgfilled; 31 | final Color? bgcolor; 32 | final EdgeInsets? fieldPadding; 33 | 34 | @override 35 | InputBorder get errorBorder => OutlineInputBorder( 36 | borderSide: BorderSide( 37 | color: Colors.red.shade800, 38 | width: borderWidth ?? 0, 39 | ), 40 | borderRadius: getradius(shape), 41 | ); 42 | 43 | @override 44 | InputBorder get focusedErrorBorder => OutlineInputBorder( 45 | borderSide: BorderSide( 46 | color: Colors.red, 47 | width: borderWidth ?? 0, 48 | ), 49 | borderRadius: getradius(shape), 50 | ); 51 | @override 52 | InputBorder get focusedBorder => OutlineInputBorder( 53 | borderSide: BorderSide( 54 | color: editingBorderColor ?? Theme.of(context).primaryColor, 55 | width: borderWidth ?? 0, 56 | ), 57 | borderRadius: getradius(shape), 58 | ); 59 | 60 | @override 61 | InputBorder get enabledBorder => OutlineInputBorder( 62 | borderSide: BorderSide( 63 | color: editingBorderColor ?? Theme.of(context).primaryColor, 64 | width: borderWidth ?? 0, 65 | ), 66 | borderRadius: getradius(shape), 67 | ); 68 | @override 69 | InputBorder get border => OutlineInputBorder( 70 | borderSide: BorderSide( 71 | color: editingBorderColor ?? Theme.of(context).primaryColor, 72 | width: borderWidth ?? 0, 73 | ), 74 | borderRadius: getradius(shape), 75 | ); 76 | @override 77 | InputBorder get disabledBorder => OutlineInputBorder( 78 | borderSide: BorderSide( 79 | color: editingBorderColor ?? Theme.of(context).primaryColor, 80 | width: borderWidth ?? 0, 81 | ), 82 | borderRadius: getradius(shape), 83 | ); 84 | 85 | @override 86 | Widget? get prefixIcon => gfprefixIcon; 87 | 88 | @override 89 | String? get hintText => hinttext; 90 | 91 | @override 92 | bool get filled => bgfilled; 93 | 94 | @override 95 | Color? get fillColor => bgcolor; 96 | 97 | @override 98 | EdgeInsets get contentPadding => 99 | fieldPadding ?? const EdgeInsets.symmetric(horizontal: 4, vertical: 4); 100 | 101 | BorderRadius getradius(GFTextFieldShape shape) { 102 | double radius = 0; 103 | switch (shape) { 104 | case GFTextFieldShape.pills: 105 | radius = 50; 106 | break; 107 | case GFTextFieldShape.roundedsquare: 108 | radius = borderRadius ?? 0; 109 | break; 110 | case GFTextFieldShape.square: 111 | radius = 0; 112 | break; 113 | } 114 | return BorderRadius.circular(radius); 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.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 parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | generated_key_values = {} 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) do |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | generated_key_values[podname] = podpath 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | end 32 | generated_key_values 33 | end 34 | 35 | target 'Runner' do 36 | use_frameworks! 37 | use_modular_headers! 38 | 39 | # Flutter Pod 40 | 41 | copied_flutter_dir = File.join(__dir__, 'Flutter') 42 | copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') 43 | copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') 44 | unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) 45 | # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. 46 | # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. 47 | # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. 48 | 49 | generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') 50 | unless File.exist?(generated_xcode_build_settings_path) 51 | raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" 52 | end 53 | generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) 54 | cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; 55 | 56 | unless File.exist?(copied_framework_path) 57 | FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) 58 | end 59 | unless File.exist?(copied_podspec_path) 60 | FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) 61 | end 62 | end 63 | 64 | # Keep pod path relative so it can be checked into Podfile.lock. 65 | pod 'Flutter', :path => 'Flutter' 66 | 67 | # Plugin Pods 68 | 69 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 70 | # referring to absolute paths on developers' machines. 71 | system('rm -rf .symlinks') 72 | system('mkdir -p .symlinks/plugins') 73 | plugin_pods = parse_KV_file('../.flutter-plugins') 74 | plugin_pods.each do |name, path| 75 | symlink = File.join('.symlinks', 'plugins', name) 76 | File.symlink(path, symlink) 77 | pod name, :path => File.join(symlink, 'ios') 78 | end 79 | end 80 | 81 | # Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. 82 | install! 'cocoapods', :disable_input_output_paths => true 83 | 84 | post_install do |installer| 85 | installer.pods_project.targets.each do |target| 86 | target.build_configurations.each do |config| 87 | config.build_settings['ENABLE_BITCODE'] = 'NO' 88 | end 89 | end 90 | end 91 | -------------------------------------------------------------------------------- /lib/components/form/form_field/widgets/gf_formdropdown.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:getwidget/components/form/form_field/decorations/gf_formfield_decoration.dart'; 3 | import 'package:getwidget/components/form/form_field/gf_formhandler_widget.dart'; 4 | import 'package:getwidget/components/form/form_field/widgets/providers/gf_formdropdownprovider.dart'; 5 | import 'package:getwidget/components/form/gf_form_provider.dart'; 6 | import 'package:getwidget/shape/gf_textfield_shape.dart'; 7 | 8 | class GfFormDropDown extends StatefulWidget { 9 | const GfFormDropDown( 10 | {Key? key, 11 | required this.values, 12 | this.initialValue, 13 | this.padding, 14 | this.margin, 15 | this.borderradius, 16 | this.editingbordercolor, 17 | this.idlebordercolor, 18 | this.iconPrefix, 19 | this.backgroundcolor, 20 | this.hintText}) 21 | : super(key: key); 22 | final EdgeInsets? margin; 23 | final EdgeInsets? padding; 24 | final List values; 25 | final String? initialValue; 26 | final double? borderradius; 27 | final Color? editingbordercolor; 28 | final Color? idlebordercolor; 29 | final Icon? iconPrefix; 30 | final Color? backgroundcolor; 31 | final String? hintText; 32 | 33 | @override 34 | State createState() => _GfFormDropDownState(); 35 | } 36 | 37 | class _GfFormDropDownState extends State { 38 | String selectedValue = ''; 39 | late final GfFormHandler gfFormHandler; 40 | late final GfFormDropdownData dataModel; 41 | 42 | @override 43 | void initState() { 44 | selectedValue = widget.initialValue ?? widget.values[0]; 45 | dataModel = GfFormDropdownData(selectedValue: selectedValue); 46 | super.initState(); 47 | } 48 | 49 | @override 50 | Widget build(BuildContext context) { 51 | try { 52 | final GfFormHandler gfFormHandler = 53 | GfFormHandlerWidget.of(context).gfFormHandler; 54 | gfFormHandler.setModel(dataModel); 55 | } on Exception catch (e) { 56 | print('Exception at attaching to handler : $e'); 57 | } 58 | return AnimatedBuilder( 59 | animation: dataModel, 60 | builder: (context, child) { 61 | selectedValue = dataModel.selectedValue; 62 | return Container( 63 | margin: widget.margin ?? 64 | const EdgeInsets.symmetric(vertical: 2, horizontal: 2), 65 | padding: widget.padding ?? 66 | const EdgeInsets.symmetric(vertical: 2, horizontal: 2), 67 | child: DropdownButtonFormField( 68 | value: selectedValue, 69 | decoration: GfFormFieldDecoration( 70 | context: context, 71 | shape: GFTextFieldShape.roundedsquare, 72 | borderRadius: widget.borderradius ?? 6.0, 73 | editingBorderColor: widget.editingbordercolor, 74 | idleBorderColor: widget.idlebordercolor, 75 | gfprefixIcon: widget.iconPrefix, 76 | bgfilled: true, 77 | bgcolor: widget.backgroundcolor, 78 | hinttext: widget.hintText != null ? widget.hintText : 'Name', 79 | ), 80 | validator: (value) => null, 81 | items: widget.values 82 | .map>( 83 | (String value) => DropdownMenuItem( 84 | value: value, 85 | child: Text(value), 86 | )) 87 | .toList(), 88 | onChanged: (String? textx) { 89 | selectedValue = textx.toString(); 90 | dataModel.setValue(selectedValue); 91 | }), 92 | ); 93 | }); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /lib/components/form/form_field/widgets/gf_multiselectcheckbox.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:getwidget/components/form/form_field/gf_formhandler_widget.dart'; 3 | import 'package:getwidget/components/form/form_field/widgets/providers/gf_multicheckboxselectionprovider.dart'; 4 | import 'package:getwidget/components/form/gf_form_provider.dart'; 5 | import 'package:getwidget/getwidget.dart'; 6 | 7 | class GfMultiCheckbox extends StatelessWidget { 8 | GfMultiCheckbox({ 9 | Key? key, 10 | this.onSelected, 11 | required this.onSelectedindex, 12 | this.margin, 13 | this.padding, 14 | this.borderColor, 15 | this.headingText, 16 | this.borderWidth, 17 | required this.values, 18 | this.preSelected, 19 | }) : super(key: key) { 20 | dataModel = GfMultiCheckboxData(values: values, preselected: preSelected); 21 | } 22 | final Function(List)? onSelected; 23 | final Function(List) onSelectedindex; 24 | final EdgeInsets? margin; 25 | final EdgeInsets? padding; 26 | final Color? borderColor; 27 | final String? headingText; 28 | final double? borderWidth; 29 | final List values; 30 | final List? preSelected; 31 | late final GfMultiCheckboxData dataModel; 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | try { 36 | final GfFormHandler gfFormHandler = 37 | GfFormHandlerWidget.of(context).gfFormHandler; 38 | gfFormHandler.setModel(dataModel); 39 | } on Exception catch (e) { 40 | print('Exception at attaching to handler : $e'); 41 | } 42 | return Container( 43 | margin: margin ?? const EdgeInsets.symmetric(vertical: 2, horizontal: 2), 44 | padding: 45 | padding ?? const EdgeInsets.symmetric(vertical: 2, horizontal: 2), 46 | child: AnimatedBuilder( 47 | animation: dataModel, 48 | builder: (context, child) { 49 | final List chips = dataModel.getlist(); 50 | return InputDecorator( 51 | decoration: InputDecoration( 52 | label: 53 | headingText != null ? Text(headingText.toString()) : null, 54 | border: OutlineInputBorder( 55 | borderRadius: BorderRadius.circular(6), 56 | borderSide: BorderSide( 57 | color: borderColor ?? Colors.black, 58 | width: borderWidth ?? 1.5)), 59 | enabledBorder: OutlineInputBorder( 60 | borderRadius: BorderRadius.circular(6), 61 | borderSide: BorderSide( 62 | color: borderColor ?? Colors.black, 63 | width: borderWidth ?? 1.5)), 64 | ), 65 | child: Column( 66 | children: [ 67 | for (int j = 0; j < chips.length; j++) ...[ 68 | Padding( 69 | padding: const EdgeInsets.only(left: 10, right: 5), 70 | child: CheckboxListTile( 71 | title: Text(chips[j].text), 72 | tileColor: Colors.white, 73 | onChanged: (bool? value) { 74 | dataModel.onSelected( 75 | index: j, value: value ?? false); 76 | if (onSelected != null) { 77 | onSelected!(dataModel.getlistselected()); 78 | } 79 | onSelectedindex(dataModel.getlistselectedindx()); 80 | }, 81 | value: chips[j].selected, 82 | ), 83 | ) 84 | ] 85 | ], 86 | )); 87 | }), 88 | ); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /test/typography_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:getwidget/getwidget.dart'; 4 | 5 | void main() { 6 | final Widget childWidget = Container( 7 | width: 11, 8 | height: 22, 9 | ); 10 | 11 | const icon = Icon(Icons.home); 12 | const text = 'Hello'; 13 | 14 | const dividerRadius = BorderRadius.all(Radius.circular(2)); 15 | const textcolor = GFColors.INFO; 16 | const dividerposition = Alignment.center; 17 | const fontWeight = FontWeight.w500; 18 | 19 | testWidgets('GFTypograpgy can be created', (WidgetTester tester) async { 20 | final GFTypography typography = GFTypography( 21 | icon: icon, 22 | dividerBorderRadius: dividerRadius, 23 | text: text, 24 | textColor: textcolor, 25 | dividerAlignment: dividerposition, 26 | type: GFTypographyType.typo2, 27 | child: childWidget, 28 | ); 29 | 30 | final TestApp app = TestApp(typography); 31 | 32 | await tester.pumpWidget(app); 33 | 34 | await tester.pumpWidget(Container(child: childWidget)); 35 | expect(find.byWidget(childWidget), findsOneWidget); 36 | 37 | expect(app.typography.child, childWidget); 38 | expect(app.typography.icon, icon); 39 | expect(app.typography.dividerAlignment, Alignment.center); 40 | expect(app.typography.dividerBorderRadius, dividerRadius); 41 | expect(app.typography.textColor, textcolor); 42 | expect(app.typography.fontWeight, fontWeight); 43 | }); 44 | 45 | testWidgets('GF Typography with divider', (tester) async { 46 | const bool divider = true; 47 | 48 | const GFTypography typography = GFTypography( 49 | text: 'type 1', 50 | showDivider: divider, 51 | ); 52 | 53 | const TestApp app = TestApp(typography); 54 | 55 | expect(app.typography.showDivider, divider); 56 | }); 57 | 58 | testWidgets('GF Typography with opacity', (tester) async { 59 | final textopacity = Colors.black.withOpacity(0.56); 60 | 61 | final GFTypography typography = GFTypography( 62 | text: 'type1', 63 | textColor: textopacity, 64 | ); 65 | 66 | final TestApp app = TestApp(typography); 67 | 68 | expect(app.typography.textColor, textopacity); 69 | }); 70 | 71 | testWidgets('GF Typography with Custom Heading', (tester) async { 72 | final textopacity = Colors.black.withOpacity(0.56); 73 | const bool divider = true; 74 | const icon = GFAvatar(); 75 | const colorfilter = ColorFilter.mode(Colors.black, BlendMode.darken); 76 | const bgImage = NetworkImage( 77 | 'https://images.unsplash.com/photo-1547721064-da6cfb341d50', 78 | ); 79 | 80 | final GFTypography typography = GFTypography( 81 | textColor: textopacity, 82 | showDivider: divider, 83 | icon: icon, 84 | backgroundImage: bgImage, 85 | backgroundImagecolorFilter: colorfilter, 86 | text: 'type1', 87 | ); 88 | 89 | final TestApp app = TestApp(typography); 90 | 91 | expect(app.typography.textColor, textopacity); 92 | expect(app.typography.showDivider, divider); 93 | expect(app.typography.icon, icon); 94 | expect(app.typography.backgroundImage, bgImage); 95 | expect(app.typography.backgroundImagecolorFilter, colorfilter); 96 | }); 97 | } 98 | 99 | class TestApp extends StatefulWidget { 100 | const TestApp(this.typography); 101 | 102 | final GFTypography typography; 103 | 104 | @override 105 | _TestAppState createState() => _TestAppState(); 106 | } 107 | 108 | class _TestAppState extends State { 109 | @override 110 | Widget build(BuildContext context) => MaterialApp( 111 | home: Scaffold( 112 | body: Column( 113 | children: [ 114 | Expanded( 115 | child: widget.typography, 116 | ) 117 | ], 118 | ), 119 | ), 120 | ); 121 | } 122 | -------------------------------------------------------------------------------- /lib/components/form/form_field/validators/validators.dart: -------------------------------------------------------------------------------- 1 | class GfFormValidators { 2 | String? Function(String?) getnamevalidator( 3 | {String? emptyErrorText, String? errorText, int? length}) { 4 | final int txtlength = length ?? 6; 5 | emptyErrorText ??= 'Please enter name'; 6 | errorText ??= 'Name should be $txtlength characters or more'; 7 | String? nameValidator(String? value) { 8 | if (value == null || value.isEmpty) { 9 | return emptyErrorText; 10 | } 11 | if (value.length < txtlength) { 12 | return errorText; 13 | } 14 | return null; 15 | } 16 | 17 | return nameValidator; 18 | } 19 | 20 | String? Function(String?) getemailvalidator( 21 | {String? emptyErrorText, String? errorText, int? length}) { 22 | final int txtlength = length ?? 6; 23 | emptyErrorText ??= 'Please enter email id'; 24 | errorText ??= 'Check your email'; 25 | String? emailvalidator(String? value) { 26 | if (value == null || value.isEmpty) { 27 | return emptyErrorText; 28 | } else if (value.length < txtlength && 29 | (!value.contains('@') && !value.contains('.'))) { 30 | return errorText; 31 | } 32 | return null; 33 | } 34 | 35 | return emailvalidator; 36 | } 37 | 38 | String? Function(String?) getpasswordvalidator( 39 | {String? emptyErrorText, String? errorText, int? length}) { 40 | final int txtlength = length ?? 6; 41 | emptyErrorText ??= 'Please enter Password'; 42 | errorText ??= 'Password should be $txtlength characters or more'; 43 | 44 | String? passwordvalidator(String? value) { 45 | if (value == null || value.isEmpty) { 46 | return emptyErrorText; 47 | } 48 | if (value.length < txtlength) { 49 | return errorText; 50 | } 51 | return null; 52 | } 53 | 54 | return passwordvalidator; 55 | } 56 | 57 | String? Function(String?) getphonevalidator( 58 | {String? emptyErrorText, String? errorText, int? length}) { 59 | final int txtlength = length ?? 6; 60 | emptyErrorText ??= 'Please enter phone number'; 61 | errorText ??= 'Enter your $txtlength digit phone number'; 62 | String? phonevalidator(String? value) { 63 | if (value == null || value.isEmpty) { 64 | return emptyErrorText; 65 | } else if (value.length < txtlength) { 66 | return errorText; 67 | } 68 | return null; 69 | } 70 | 71 | return phonevalidator; 72 | } 73 | 74 | String? Function(String?) gettextvalidator( 75 | {String? emptyErrorText, String? errorText, int? length, String? value}) { 76 | final int txtlength = length ?? 6; 77 | final String valuename = value ?? 'value'; 78 | emptyErrorText ??= 'Please enter $valuename'; 79 | errorText ??= '$valuename should be $txtlength characters or more'; 80 | String? textvalidator(String? value) { 81 | if (value == null || value.isEmpty) { 82 | return emptyErrorText; 83 | } 84 | if (value.length < txtlength) { 85 | return errorText; 86 | } 87 | return null; 88 | } 89 | 90 | return textvalidator; 91 | } 92 | 93 | String? Function(String?) getnumbervalidator( 94 | {String? emptyErrorText, String? errorText, int? length, String? value}) { 95 | final int txtlength = length ?? 6; 96 | final String valuename = value ?? 'value'; 97 | emptyErrorText ??= 'Please enter $valuename'; 98 | errorText ??= '$valuename should be $txtlength characters or more'; 99 | String? numbervalidator(String? value) { 100 | if (value == null || value.isEmpty) { 101 | return emptyErrorText; 102 | } 103 | if (value.length < txtlength) { 104 | return errorText; 105 | } 106 | if (int.tryParse(value) == null) { 107 | return 'Value should be a number'; 108 | } 109 | return null; 110 | } 111 | 112 | return numbervalidator; 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /test/avatar_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:getwidget/getwidget.dart'; 4 | 5 | void main() { 6 | final childWidget = Container( 7 | width: 60, 8 | height: 60, 9 | ); 10 | const bgColor = Colors.teal; 11 | const fgColor = Colors.transparent; 12 | 13 | testWidgets('GFAvatar can be created', (tester) async { 14 | final GFAvatar avatar = GFAvatar( 15 | backgroundColor: bgColor, 16 | foregroundColor: fgColor, 17 | size: GFSize.MEDIUM, 18 | child: childWidget); 19 | final TestApp app = TestApp(avatar); 20 | await tester.pumpWidget(app); 21 | await tester.pumpWidget(Container(child: childWidget)); 22 | expect(find.byWidget(childWidget), findsOneWidget); 23 | expect(app.avatar.backgroundColor, bgColor); 24 | expect(app.avatar.foregroundColor, fgColor); 25 | expect(app.avatar.size, GFSize.MEDIUM); 26 | expect(app.avatar.child, childWidget); 27 | }); 28 | 29 | testWidgets('GFAvatar with minRadius & maxRadius', (tester) async { 30 | const minRadius = 10.0; 31 | const maxRadius = 20.0; 32 | final GFAvatar avatar = GFAvatar( 33 | backgroundColor: bgColor, 34 | foregroundColor: fgColor, 35 | minRadius: minRadius, 36 | maxRadius: maxRadius, 37 | size: GFSize.MEDIUM, 38 | child: childWidget); 39 | final TestApp app = TestApp(avatar); 40 | await tester.pumpWidget(app); 41 | await tester.pumpWidget(Container(child: childWidget)); 42 | expect(find.byWidget(childWidget), findsOneWidget); 43 | expect(app.avatar.backgroundColor, bgColor); 44 | expect(app.avatar.foregroundColor, fgColor); 45 | expect(app.avatar.minRadius, minRadius); 46 | expect(app.avatar.maxRadius, maxRadius); 47 | expect(app.avatar.size, GFSize.MEDIUM); 48 | expect(app.avatar.child, childWidget); 49 | }); 50 | 51 | testWidgets('Circular GFAvatar with bgImage', (tester) async { 52 | const bgImage = NetworkImage( 53 | 'https://images.unsplash.com/photo-1547721064-da6cfb341d50', 54 | ); 55 | 56 | const GFAvatar avatar = GFAvatar( 57 | backgroundImage: bgImage, 58 | shape: GFAvatarShape.circle, 59 | ); 60 | 61 | const TestApp app = TestApp(avatar); 62 | 63 | expect(app.avatar.backgroundImage, bgImage); 64 | expect(app.avatar.shape, GFAvatarShape.circle); 65 | }); 66 | 67 | testWidgets('Square GFAvatar with bgImage', (tester) async { 68 | const bgImage = NetworkImage( 69 | 'https://images.unsplash.com/photo-1547721064-da6cfb341d50', 70 | ); 71 | 72 | const GFAvatar avatar = GFAvatar( 73 | backgroundImage: bgImage, 74 | shape: GFAvatarShape.square, 75 | ); 76 | 77 | const TestApp app = TestApp(avatar); 78 | 79 | expect(app.avatar.backgroundImage, bgImage); 80 | expect(app.avatar.shape, GFAvatarShape.square); 81 | }); 82 | 83 | testWidgets('Standard shape GFAvatar with bgImage', (tester) async { 84 | const bgImage = NetworkImage( 85 | 'https://images.unsplash.com/photo-1547721064-da6cfb341d50', 86 | ); 87 | 88 | const GFAvatar avatar = GFAvatar( 89 | backgroundImage: bgImage, 90 | shape: GFAvatarShape.standard, 91 | ); 92 | 93 | const TestApp app = TestApp(avatar); 94 | 95 | expect(app.avatar.backgroundImage, bgImage); 96 | expect(app.avatar.shape, GFAvatarShape.standard); 97 | }); 98 | } 99 | 100 | class TestApp extends StatefulWidget { 101 | const TestApp(this.avatar); 102 | final GFAvatar avatar; 103 | @override 104 | _TestAppState createState() => _TestAppState(); 105 | } 106 | 107 | class _TestAppState extends State { 108 | @override 109 | Widget build(BuildContext context) => MaterialApp( 110 | home: Scaffold( 111 | body: Column( 112 | children: [ 113 | widget.avatar, 114 | ], 115 | ), 116 | ), 117 | ); 118 | } 119 | -------------------------------------------------------------------------------- /lib/components/form/form_field/widgets/gf_multichoicechip.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:getwidget/components/form/form_field/gf_formhandler_widget.dart'; 3 | import 'package:getwidget/components/form/form_field/widgets/providers/gf_multichipselectionprovider.dart'; 4 | import 'package:getwidget/components/form/gf_form_provider.dart'; 5 | import 'package:getwidget/getwidget.dart'; 6 | 7 | class GfMultiChoiceChip extends StatelessWidget { 8 | GfMultiChoiceChip({ 9 | Key? key, 10 | this.onSelected, 11 | required this.onSelectedindex, 12 | this.margin, 13 | this.padding, 14 | this.borderColor, 15 | this.headingText, 16 | this.borderWidth, 17 | required this.values, 18 | this.preSelected, 19 | }) : super(key: key) { 20 | dataModel = GfMultiChipSelectData(values: values, preselected: preSelected); 21 | } 22 | final Function(List)? onSelected; 23 | final Function(List) onSelectedindex; 24 | final EdgeInsets? margin; 25 | final EdgeInsets? padding; 26 | final Color? borderColor; 27 | final String? headingText; 28 | final double? borderWidth; 29 | final List values; 30 | final List? preSelected; 31 | late final GfMultiChipSelectData dataModel; 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | try { 36 | final GfFormHandler gfFormHandler = 37 | GfFormHandlerWidget.of(context).gfFormHandler; 38 | gfFormHandler.setModel(dataModel); 39 | } on Exception catch (e) { 40 | print('Exception at attaching to handler : $e'); 41 | } 42 | 43 | return Container( 44 | margin: margin ?? const EdgeInsets.symmetric(vertical: 2, horizontal: 2), 45 | padding: 46 | padding ?? const EdgeInsets.symmetric(vertical: 2, horizontal: 2), 47 | child: AnimatedBuilder( 48 | animation: dataModel, 49 | builder: (context, child) { 50 | final List chips = dataModel.getlist(); 51 | return InputDecorator( 52 | decoration: InputDecoration( 53 | label: 54 | headingText != null ? Text(headingText.toString()) : null, 55 | border: OutlineInputBorder( 56 | borderRadius: BorderRadius.circular(6), 57 | borderSide: BorderSide( 58 | color: borderColor ?? Colors.black, 59 | width: borderWidth ?? 1.5)), 60 | enabledBorder: OutlineInputBorder( 61 | borderRadius: BorderRadius.circular(6), 62 | borderSide: BorderSide( 63 | color: borderColor ?? Colors.black, 64 | width: borderWidth ?? 1.5)), 65 | ), 66 | child: Wrap( 67 | children: [ 68 | for (int j = 0; j < chips.length; j++) ...[ 69 | Padding( 70 | padding: const EdgeInsets.only(left: 10, right: 5), 71 | child: ChoiceChip( 72 | label: Text(chips[j].text), 73 | labelStyle: const TextStyle(color: Colors.black), 74 | backgroundColor: Colors.green, 75 | selectedColor: Colors.orange, 76 | disabledColor: Colors.white, 77 | selected: chips[j].selected, 78 | onSelected: (bool value) { 79 | dataModel.onSelected(index: j, value: value); 80 | if (onSelected != null) { 81 | onSelected!(dataModel.getlistselected()); 82 | } 83 | onSelectedindex( 84 | dataModel.getlistselectedindx()); 85 | })) 86 | ] 87 | ], 88 | )); 89 | }), 90 | ); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /test/items_carousel_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:getwidget/getwidget.dart'; 4 | 5 | class StateMarker extends StatefulWidget { 6 | const StateMarker({Key? key, this.child}) : super(key: key); 7 | final Widget? child; 8 | @override 9 | StateMarkerState createState() => StateMarkerState(); 10 | } 11 | 12 | class StateMarkerState extends State { 13 | String? marker; 14 | @override 15 | Widget build(BuildContext context) { 16 | if (widget.child != null) { 17 | return widget.child!; 18 | } 19 | return Container(); 20 | } 21 | } 22 | 23 | void main() { 24 | final Key carouselKey = UniqueKey(); 25 | final List textList = [ 26 | 'AAAAAA', 27 | 'BBBBBB', 28 | 'CCCCCC', 29 | 'DDDDDD', 30 | 'EEEEEE' 31 | ]; 32 | final List itemList = [ 33 | Text(textList[0]), 34 | Text(textList[1]), 35 | Text(textList[2]), 36 | Text(textList[3]), 37 | Text(textList[4]) 38 | ]; 39 | 40 | testWidgets('GFItemsCarousel can be constructed', (tester) async { 41 | final GFItemsCarousel carousel = GFItemsCarousel( 42 | key: carouselKey, 43 | rowCount: 3, 44 | children: itemList.map((text) => StateMarker(child: text)).toList(), 45 | ); 46 | 47 | StateMarkerState findStateMarkerState(String name) => 48 | tester.state(find.widgetWithText(StateMarker, name)); 49 | 50 | final TestApp app = TestApp(carousel); 51 | await tester.pumpWidget(app); 52 | 53 | // find carousel by key 54 | expect(find.byKey(carouselKey), findsOneWidget); 55 | // find the 'AAAAAA', 'BBBBBB' and 'CCCCCC' text in carousel 56 | expect(find.text('AAAAAA'), findsOneWidget); 57 | expect(find.text('BBBBBB'), findsOneWidget); 58 | expect(find.text('CCCCCC'), findsOneWidget); 59 | 60 | // slide to the second slide. 61 | 62 | TestGesture gesture = 63 | await tester.startGesture(tester.getCenter(find.text('AAAAAA'))); 64 | await gesture.moveBy(const Offset(-600, 0)); 65 | await tester.pump(); 66 | findStateMarkerState(textList[1]).marker = 'marked'; 67 | await gesture.up(); 68 | await tester.pump(); 69 | await tester.pump(const Duration(seconds: 1)); 70 | // find the 'CCCCCC', 'DDDDDD' and 'EEEEEE' text in carousel 71 | expect(find.text('DDDDDD'), findsOneWidget); 72 | expect(find.text('EEEEEE'), findsOneWidget); 73 | expect(find.text('CCCCCC'), findsOneWidget); 74 | await tester.pumpWidget(app); 75 | expect(findStateMarkerState(textList[1]).marker, equals('marked')); 76 | 77 | // slide back to the first slide. 78 | gesture = 79 | await tester.startGesture(tester.getCenter(find.text(textList[2]))); 80 | await gesture.moveBy(const Offset(600, 0)); 81 | await tester.pump(); 82 | final StateMarkerState markerState = findStateMarkerState(textList[1]); 83 | markerState.marker = 'marked'; 84 | await gesture.up(); 85 | await tester.pump(); 86 | await tester.pump(const Duration(seconds: 1)); 87 | // find the 'AAAAAA', 'BBBBBB' and 'CCCCCC' text in carousel 88 | expect(find.text('AAAAAA'), findsOneWidget); 89 | expect(find.text('BBBBBB'), findsOneWidget); 90 | expect(find.text('CCCCCC'), findsOneWidget); 91 | await tester.pumpWidget(app); 92 | expect(findStateMarkerState(textList[1]).marker, equals('marked')); 93 | }); 94 | } 95 | 96 | class TestApp extends StatefulWidget { 97 | const TestApp(this.carousel); 98 | 99 | final GFItemsCarousel carousel; 100 | 101 | @override 102 | _TestAppState createState() => _TestAppState(); 103 | } 104 | 105 | class _TestAppState extends State { 106 | @override 107 | Widget build(BuildContext context) => MaterialApp( 108 | home: Scaffold( 109 | body: Column( 110 | children: [ 111 | widget.carousel, 112 | ], 113 | ), 114 | ), 115 | ); 116 | } 117 | -------------------------------------------------------------------------------- /example/windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 12 | 13 | # === Flutter Library === 14 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 15 | 16 | # Published to parent scope for install step. 17 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 18 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 19 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 20 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 21 | 22 | list(APPEND FLUTTER_LIBRARY_HEADERS 23 | "flutter_export.h" 24 | "flutter_windows.h" 25 | "flutter_messenger.h" 26 | "flutter_plugin_registrar.h" 27 | "flutter_texture_registrar.h" 28 | ) 29 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 30 | add_library(flutter INTERFACE) 31 | target_include_directories(flutter INTERFACE 32 | "${EPHEMERAL_DIR}" 33 | ) 34 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 35 | add_dependencies(flutter flutter_assemble) 36 | 37 | # === Wrapper === 38 | list(APPEND CPP_WRAPPER_SOURCES_CORE 39 | "core_implementations.cc" 40 | "standard_codec.cc" 41 | ) 42 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 43 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 44 | "plugin_registrar.cc" 45 | ) 46 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 47 | list(APPEND CPP_WRAPPER_SOURCES_APP 48 | "flutter_engine.cc" 49 | "flutter_view_controller.cc" 50 | ) 51 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 52 | 53 | # Wrapper sources needed for a plugin. 54 | add_library(flutter_wrapper_plugin STATIC 55 | ${CPP_WRAPPER_SOURCES_CORE} 56 | ${CPP_WRAPPER_SOURCES_PLUGIN} 57 | ) 58 | apply_standard_settings(flutter_wrapper_plugin) 59 | set_target_properties(flutter_wrapper_plugin PROPERTIES 60 | POSITION_INDEPENDENT_CODE ON) 61 | set_target_properties(flutter_wrapper_plugin PROPERTIES 62 | CXX_VISIBILITY_PRESET hidden) 63 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 64 | target_include_directories(flutter_wrapper_plugin PUBLIC 65 | "${WRAPPER_ROOT}/include" 66 | ) 67 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 68 | 69 | # Wrapper sources needed for the runner. 70 | add_library(flutter_wrapper_app STATIC 71 | ${CPP_WRAPPER_SOURCES_CORE} 72 | ${CPP_WRAPPER_SOURCES_APP} 73 | ) 74 | apply_standard_settings(flutter_wrapper_app) 75 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 76 | target_include_directories(flutter_wrapper_app PUBLIC 77 | "${WRAPPER_ROOT}/include" 78 | ) 79 | add_dependencies(flutter_wrapper_app flutter_assemble) 80 | 81 | # === Flutter tool backend === 82 | # _phony_ is a non-existent file to force this command to run every time, 83 | # since currently there's no way to get a full input/output list from the 84 | # flutter tool. 85 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 86 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 87 | add_custom_command( 88 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 89 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 90 | ${CPP_WRAPPER_SOURCES_APP} 91 | ${PHONY_OUTPUT} 92 | COMMAND ${CMAKE_COMMAND} -E env 93 | ${FLUTTER_TOOL_ENVIRONMENT} 94 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 95 | windows-x64 $ 96 | VERBATIM 97 | ) 98 | add_custom_target(flutter_assemble DEPENDS 99 | "${FLUTTER_LIBRARY}" 100 | ${FLUTTER_LIBRARY_HEADERS} 101 | ${CPP_WRAPPER_SOURCES_CORE} 102 | ${CPP_WRAPPER_SOURCES_PLUGIN} 103 | ${CPP_WRAPPER_SOURCES_APP} 104 | ) 105 | -------------------------------------------------------------------------------- /example/linux/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | #ifdef GDK_WINDOWING_X11 5 | #include 6 | #endif 7 | 8 | #include "flutter/generated_plugin_registrant.h" 9 | 10 | struct _MyApplication { 11 | GtkApplication parent_instance; 12 | char** dart_entrypoint_arguments; 13 | }; 14 | 15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 16 | 17 | // Implements GApplication::activate. 18 | static void my_application_activate(GApplication* application) { 19 | MyApplication* self = MY_APPLICATION(application); 20 | GtkWindow* window = 21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 22 | 23 | // Use a header bar when running in GNOME as this is the common style used 24 | // by applications and is the setup most users will be using (e.g. Ubuntu 25 | // desktop). 26 | // If running on X and not using GNOME then just use a traditional title bar 27 | // in case the window manager does more exotic layout, e.g. tiling. 28 | // If running on Wayland assume the header bar will work (may need changing 29 | // if future cases occur). 30 | gboolean use_header_bar = TRUE; 31 | #ifdef GDK_WINDOWING_X11 32 | GdkScreen* screen = gtk_window_get_screen(window); 33 | if (GDK_IS_X11_SCREEN(screen)) { 34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); 35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) { 36 | use_header_bar = FALSE; 37 | } 38 | } 39 | #endif 40 | if (use_header_bar) { 41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 42 | gtk_widget_show(GTK_WIDGET(header_bar)); 43 | gtk_header_bar_set_title(header_bar, "example"); 44 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 46 | } else { 47 | gtk_window_set_title(window, "example"); 48 | } 49 | 50 | gtk_window_set_default_size(window, 1280, 720); 51 | gtk_widget_show(GTK_WIDGET(window)); 52 | 53 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); 55 | 56 | FlView* view = fl_view_new(project); 57 | gtk_widget_show(GTK_WIDGET(view)); 58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 59 | 60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 61 | 62 | gtk_widget_grab_focus(GTK_WIDGET(view)); 63 | } 64 | 65 | // Implements GApplication::local_command_line. 66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { 67 | MyApplication* self = MY_APPLICATION(application); 68 | // Strip out the first argument as it is the binary name. 69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); 70 | 71 | g_autoptr(GError) error = nullptr; 72 | if (!g_application_register(application, nullptr, &error)) { 73 | g_warning("Failed to register: %s", error->message); 74 | *exit_status = 1; 75 | return TRUE; 76 | } 77 | 78 | g_application_activate(application); 79 | *exit_status = 0; 80 | 81 | return TRUE; 82 | } 83 | 84 | // Implements GObject::dispose. 85 | static void my_application_dispose(GObject* object) { 86 | MyApplication* self = MY_APPLICATION(object); 87 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); 88 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object); 89 | } 90 | 91 | static void my_application_class_init(MyApplicationClass* klass) { 92 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 93 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; 94 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose; 95 | } 96 | 97 | static void my_application_init(MyApplication* self) {} 98 | 99 | MyApplication* my_application_new() { 100 | return MY_APPLICATION(g_object_new(my_application_get_type(), 101 | "application-id", APPLICATION_ID, 102 | "flags", G_APPLICATION_NON_UNIQUE, 103 | nullptr)); 104 | } 105 | --------------------------------------------------------------------------------