├── linux ├── .gitignore ├── main.cc ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ ├── generated_plugins.cmake │ └── CMakeLists.txt ├── my_application.h ├── my_application.cc └── CMakeLists.txt ├── lib ├── widgets │ ├── wild_list │ │ ├── web_view │ │ │ ├── web_view_list.dart │ │ │ └── web_view_wild_list.dart │ │ ├── buttons │ │ │ ├── button_wild_list.dart │ │ │ └── button_list.dart │ │ ├── carousels │ │ │ ├── carousel_wild_list.dart │ │ │ └── carousel_list.dart │ │ └── shapes │ │ │ └── shape_wild_list.dart │ ├── empty_component.dart │ ├── no_results_found_for_query.dart │ ├── body_content.dart │ ├── search_box.dart │ ├── main_view.dart │ ├── side_bar.dart │ ├── side_menu_tile.dart │ ├── WidList │ │ └── shapes │ │ │ └── shape_list.dart │ └── nav_bar │ │ └── presentation │ │ └── custom_dialog.dart ├── constants │ └── app_colors.dart ├── screens │ ├── cards.dart │ ├── shapes.dart │ ├── buttons.dart │ ├── layouts.dart │ ├── navigation.dart │ ├── columns.dart │ ├── web_view.dart │ ├── carousel.dart │ ├── ShowCase │ │ └── presentation │ │ │ └── ShowCase.dart │ ├── recently_added.dart │ └── intro_page.dart ├── models │ └── card_model.dart ├── providers │ ├── side_bar_provider.dart │ └── search_provider.dart ├── app.dart ├── shared │ ├── utils.dart │ └── exports.dart ├── services │ └── datafetch │ │ └── firebase_repository.dart ├── main.dart ├── firebase_options.dart └── router.dart ├── .vscode └── settings.json ├── ios ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── GoogleService-Info.plist │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── firebase_app_id_file.json ├── RunnerTests │ └── RunnerTests.swift ├── .gitignore └── Podfile ├── vercel.json ├── assets ├── birb.riv ├── empty.riv └── images │ ├── boat.jpg │ ├── pink.jpg │ ├── sea.jpg │ ├── tree.jpg │ ├── clock.png │ ├── forest.jpg │ ├── light-1.png │ ├── light-2.png │ ├── background.png │ └── butterflies.jpg ├── web ├── favicon.ico ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── manifest.json ├── index.html └── styles.css ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── fluttersnips │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── google-services.json │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── macos ├── Runner │ ├── Configs │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Warnings.xcconfig │ │ └── AppInfo.xcconfig │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ ├── app_icon_64.png │ │ │ ├── app_icon_1024.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Release.entitlements │ ├── DebugProfile.entitlements │ ├── MainFlutterWindow.swift │ ├── Info.plist │ └── GoogleService-Info.plist ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── firebase_app_id_file.json ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── RunnerTests │ └── RunnerTests.swift └── Podfile ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── utils.h │ ├── runner.exe.manifest │ ├── flutter_window.h │ ├── main.cpp │ ├── CMakeLists.txt │ ├── utils.cpp │ ├── flutter_window.cpp │ ├── Runner.rc │ └── win32_window.h ├── .gitignore ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ ├── generated_plugin_registrant.cc │ └── CMakeLists.txt └── CMakeLists.txt ├── .gitignore ├── LICENSE ├── test └── widget_test.dart ├── pubspec.yaml ├── analysis_options.yaml ├── .metadata ├── CONTRIBUTING.md └── README.md /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /lib/widgets/wild_list/web_view/web_view_list.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "dotnet.defaultSolution": "disable" 3 | } -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "routes": [{ "src": "/[^.]+", "dest": "/", "status": 200 }] 3 | } -------------------------------------------------------------------------------- /assets/birb.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/assets/birb.riv -------------------------------------------------------------------------------- /assets/empty.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/assets/empty.riv -------------------------------------------------------------------------------- /web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/web/favicon.ico -------------------------------------------------------------------------------- /assets/images/boat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/assets/images/boat.jpg -------------------------------------------------------------------------------- /assets/images/pink.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/assets/images/pink.jpg -------------------------------------------------------------------------------- /assets/images/sea.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/assets/images/sea.jpg -------------------------------------------------------------------------------- /assets/images/tree.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/assets/images/tree.jpg -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /assets/images/clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/assets/images/clock.png -------------------------------------------------------------------------------- /assets/images/forest.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/assets/images/forest.jpg -------------------------------------------------------------------------------- /assets/images/light-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/assets/images/light-1.png -------------------------------------------------------------------------------- /assets/images/light-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/assets/images/light-2.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /assets/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/assets/images/background.png -------------------------------------------------------------------------------- /assets/images/butterflies.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/assets/images/butterflies.jpg -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /lib/constants/app_colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | const Color primaryColor = Color(0xFF38BACC); 4 | 5 | -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dhruvpatidar359/Fluttersnips/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/fluttersnips/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.fluttersnips 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/screens/cards.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluttersnips/shared/exports.dart'; 2 | import 'package:fluttersnips/widgets/wild_list/card/card_list.dart'; 3 | 4 | class Cards extends BodyContent { 5 | const Cards({super.key}) 6 | : super(tabIndex: 0, gridCrossAxisCount: 2, data: cardListW); 7 | } 8 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/screens/shapes.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluttersnips/shared/exports.dart'; 2 | import 'package:fluttersnips/widgets/wild_list/shapes/shape_list.dart'; 3 | 4 | class Shapes extends BodyContent { 5 | const Shapes({super.key}) 6 | : super(tabIndex: 1, gridCrossAxisCount: 2, data: shapeListW); 7 | } 8 | -------------------------------------------------------------------------------- /ios/firebase_app_id_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "file_generated_by": "FlutterFire CLI", 3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", 4 | "GOOGLE_APP_ID": "1:1032616268679:ios:58b73cb729d153a43db922", 5 | "FIREBASE_PROJECT_ID": "flusnip", 6 | "GCM_SENDER_ID": "1032616268679" 7 | } -------------------------------------------------------------------------------- /lib/screens/buttons.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluttersnips/shared/exports.dart'; 2 | import 'package:fluttersnips/widgets/wild_list/buttons/button_list.dart'; 3 | 4 | class Buttons extends BodyContent { 5 | const Buttons({super.key}) 6 | : super(tabIndex: 1, gridCrossAxisCount: 2, data: buttonListW); 7 | } 8 | -------------------------------------------------------------------------------- /lib/screens/layouts.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluttersnips/shared/exports.dart'; 2 | import 'package:fluttersnips/widgets/wild_list/layout/layout_list.dart'; 3 | 4 | class Layouts extends BodyContent { 5 | const Layouts({super.key}) 6 | : super(tabIndex: 0, gridCrossAxisCount: 1, data: layoutListW); 7 | } 8 | -------------------------------------------------------------------------------- /macos/firebase_app_id_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "file_generated_by": "FlutterFire CLI", 3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", 4 | "GOOGLE_APP_ID": "1:1032616268679:ios:60d3348ee5d4dde23db922", 5 | "FIREBASE_PROJECT_ID": "flusnip", 6 | "GCM_SENDER_ID": "1032616268679" 7 | } -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/screens/navigation.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluttersnips/shared/exports.dart'; 2 | import 'package:fluttersnips/widgets/wild_list/nav_bar/nav_bar_list.dart'; 3 | 4 | class Navigation extends BodyContent { 5 | Navigation({super.key}) 6 | : super(tabIndex: 2, gridCrossAxisCount: 1, data: navbarListW); 7 | } 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/models/card_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CardModel { 4 | final String email; 5 | final String code; 6 | final String classT; 7 | final Widget? widget; 8 | final String title; 9 | 10 | const CardModel(this.email, this.code, this.classT, this.widget, this.title); 11 | } 12 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/screens/columns.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttersnips/widgets/empty_component.dart'; 3 | 4 | class Columns extends StatelessWidget { 5 | const Columns({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return const EmptyComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/screens/web_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttersnips/widgets/empty_component.dart'; 3 | 4 | class WebView extends StatelessWidget { 5 | const WebView({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return const EmptyComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/screens/carousel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttersnips/shared/exports.dart'; 3 | import 'package:fluttersnips/widgets/wild_list/carousels/carousel_list.dart'; 4 | 5 | class Carousel extends BodyContent { 6 | const Carousel({super.key}) 7 | : super(tabIndex: 1, gridCrossAxisCount: 2, data: carouselListW); 8 | } 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import FlutterMacOS 2 | import Cocoa 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 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/widgets/empty_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttersnips/shared/exports.dart'; 3 | 4 | class EmptyComponent extends StatelessWidget { 5 | const EmptyComponent({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return const Center( 10 | child: SizedBox( 11 | height: 200, 12 | width: 200, 13 | child: RiveAnimation.asset('assets/empty.riv'), 14 | ), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/widgets/no_results_found_for_query.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttersnips/shared/exports.dart'; 3 | 4 | class NoResultsFoundForQuery extends StatelessWidget { 5 | const NoResultsFoundForQuery({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return Center( 10 | child: Obx(() { 11 | return Text( 12 | "No results found for '${searchProvider.query}'", 13 | style: GoogleFonts.poppins(fontSize: 15, color: Colors.grey), 14 | ); 15 | }), 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 = fluttersnips 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.fluttersnips 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /lib/screens/ShowCase/presentation/ShowCase.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttersnips/widgets/nav_bar/presentation/nav_bar.dart'; 3 | import 'package:fluttersnips/widgets/side_bar.dart'; 4 | 5 | class Showcase extends StatelessWidget { 6 | final Widget child; 7 | const Showcase({super.key, required this.child}); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Scaffold( 12 | body: Row( 13 | children: [ 14 | const Expanded(child: SideBar()), 15 | Expanded( 16 | flex: 4, 17 | child: Stack(children: [child, const NavBar()]), 18 | ), 19 | ], 20 | ), 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.3.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | tasks.register("clean", Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | *.env 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | migrate_working_dir/ 13 | 14 | # IntelliJ related 15 | *.iml 16 | *.ipr 17 | *.iws 18 | .idea/ 19 | 20 | # The .vscode folder contains launch configuration and tasks you configure in 21 | # VS Code which you may wish to be included in version control, so this line 22 | # is commented out by default. 23 | #.vscode/ 24 | 25 | # Flutter/Dart/Pub related 26 | **/doc/api/ 27 | **/ios/Flutter/.last_build_id 28 | .dart_tool/ 29 | .flutter-plugins 30 | .flutter-plugins-dependencies 31 | .packages 32 | .pub-cache/ 33 | .pub/ 34 | /build/ 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Android Studio will place build artifacts here 43 | /android/app/debug 44 | /android/app/profile 45 | /android/app/release 46 | .vercel 47 | -------------------------------------------------------------------------------- /lib/providers/side_bar_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get_rx/src/rx_types/rx_types.dart'; 3 | import 'package:get/get_state_manager/get_state_manager.dart'; 4 | 5 | class SideBarProvider extends GetxController { 6 | Rx currentTab = (-1).obs; 7 | 8 | void setCurrentTab(int value) => currentTab.value = value; 9 | 10 | final List<({String title, IconData iconData})> tabs = [ 11 | (title: 'Recently Added', iconData: Icons.history), 12 | (title: 'Cards', iconData: Icons.credit_card), 13 | (title: 'Shapes', iconData: Icons.interests), 14 | (title: 'Navigation', iconData: Icons.navigation), 15 | (title: 'WebView', iconData: Icons.web), 16 | (title: 'Column', iconData: Icons.view_column), 17 | (title: 'Buttons', iconData: Icons.ads_click), 18 | (title: 'Layout', iconData: Icons.mobile_friendly), 19 | (title: 'Carousel', iconData: Icons.slideshow_outlined), 20 | ]; 21 | } 22 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/widgets/body_content.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttersnips/shared/exports.dart'; 3 | 4 | class BodyContent extends StatelessWidget { 5 | final int tabIndex; 6 | final int gridCrossAxisCount; 7 | final List data; 8 | const BodyContent({ 9 | super.key, 10 | required this.tabIndex, 11 | required this.gridCrossAxisCount, 12 | required this.data, 13 | }); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Obx(() { 18 | List data; 19 | 20 | if (sideBarProvider.currentTab.value == tabIndex && 21 | searchProvider.query.isEmpty) { 22 | data = this.data; 23 | } else { 24 | data = searchProvider.filteredIndex; 25 | } 26 | 27 | if (searchProvider.filteredIndex.isEmpty) { 28 | return const NoResultsFoundForQuery(); 29 | } 30 | 31 | return ShowCaseContent(crossAxisCount: gridCrossAxisCount, data: data); 32 | }); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | cloud_firestore 7 | firebase_auth 8 | firebase_core 9 | rive_common 10 | share_plus 11 | url_launcher_windows 12 | ) 13 | 14 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 15 | ) 16 | 17 | set(PLUGIN_BUNDLED_LIBRARIES) 18 | 19 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 20 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 21 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 24 | endforeach(plugin) 25 | 26 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 27 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 28 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 29 | endforeach(ffi_plugin) 30 | -------------------------------------------------------------------------------- /lib/app.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttersnips/constants/app_colors.dart'; 3 | import 'package:fluttersnips/router.dart'; 4 | import 'package:fluttersnips/shared/exports.dart'; 5 | 6 | class App extends StatelessWidget { 7 | const App({super.key}); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return MultiProvider( 12 | providers: [ 13 | ChangeNotifierProvider(create: (context) => SearchController()), 14 | ], 15 | child: MaterialApp.router( 16 | title: 'FlutterSnips', 17 | routerConfig: router, 18 | debugShowCheckedModeBanner: false, 19 | theme: ThemeData( 20 | primaryColor: primaryColor, 21 | colorScheme: const ColorScheme.dark( 22 | background: Colors.black, 23 | primary: primaryColor, 24 | onPrimary: Colors.white, 25 | ), 26 | useMaterial3: true, 27 | ), 28 | ), 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/providers/search_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluttersnips/shared/exports.dart'; 2 | 3 | class SearchProvider extends GetxController { 4 | Rx query = ''.obs; 5 | var searchIndex = [].obs; 6 | var filteredIndex = [].obs; 7 | 8 | void search() { 9 | late List results; 10 | 11 | if (query.isNotEmpty) { 12 | results = searchIndex.where((item) { 13 | final itemName = item.title.toLowerCase(); 14 | return itemName.contains(query.toLowerCase()); 15 | }).toList(); 16 | 17 | updateSearchIndex(results); 18 | } else { 19 | resetFilteredIndex(); 20 | } 21 | } 22 | 23 | void setSearchIndex(List data) { 24 | searchIndex.clear(); 25 | filteredIndex.clear(); 26 | searchIndex.addAll(data); 27 | filteredIndex.addAll(data); 28 | } 29 | 30 | void updateSearchIndex(List data) { 31 | filteredIndex.clear(); 32 | filteredIndex.addAll(data); 33 | } 34 | 35 | void resetFilteredIndex() { 36 | filteredIndex.clear(); 37 | filteredIndex.addAll(searchIndex); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Flutter Snips", 3 | "short_name": "Flutter Snips", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A comprehensive component library for Flutter", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Dhruv Patidar 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | import 'package:fluttersnips/app.dart'; 11 | 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const App()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import cloud_firestore 9 | import firebase_auth 10 | import firebase_core 11 | import firebase_crashlytics 12 | import path_provider_foundation 13 | import rive_common 14 | import share_plus 15 | import url_launcher_macos 16 | 17 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 18 | FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin")) 19 | FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) 20 | FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) 21 | FLTFirebaseCrashlyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCrashlyticsPlugin")) 22 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 23 | RivePlugin.register(with: registry.registrar(forPlugin: "RivePlugin")) 24 | SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) 25 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 26 | } 27 | -------------------------------------------------------------------------------- /lib/shared/utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluttersnips/shared/exports.dart'; 2 | import 'package:fluttersnips/widgets/wild_list/card/card_list.dart'; 3 | import 'package:fluttersnips/widgets/wild_list/buttons/button_list.dart'; 4 | import 'package:fluttersnips/widgets/wild_list/carousels/carousel_list.dart'; 5 | import 'package:fluttersnips/widgets/wild_list/layout/layout_list.dart'; 6 | import 'package:fluttersnips/widgets/wild_list/nav_bar/nav_bar_list.dart'; 7 | import 'package:fluttersnips/widgets/wild_list/shapes/shape_list.dart'; 8 | 9 | class Utils { 10 | static void updateSearchIndex(int tab) { 11 | switch (tab) { 12 | case 1: 13 | searchProvider.setSearchIndex(cardListW); 14 | break; 15 | case 2: 16 | searchProvider.setSearchIndex(shapeListW); 17 | break; 18 | case 3: 19 | searchProvider.setSearchIndex(navbarListW); 20 | break; 21 | case 6: 22 | searchProvider.setSearchIndex(buttonListW); 23 | break; 24 | case 7: 25 | searchProvider.setSearchIndex(layoutListW); 26 | break; 27 | case 8: 28 | searchProvider.setSearchIndex(carouselListW); 29 | break; 30 | default: 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ios/Runner/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 1032616268679-bu6cftvsjkb6cluff96p4l9q9iqovnqi.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.1032616268679-bu6cftvsjkb6cluff96p4l9q9iqovnqi 9 | API_KEY 10 | AIzaSyDtwlvIpAn7x6EGlBPNe3ybEIXU7ni6rWk 11 | GCM_SENDER_ID 12 | 1032616268679 13 | PLIST_VERSION 14 | 1 15 | BUNDLE_ID 16 | com.example.fluttersnips 17 | PROJECT_ID 18 | flusnip 19 | STORAGE_BUCKET 20 | flusnip.appspot.com 21 | IS_ADS_ENABLED 22 | 23 | IS_ANALYTICS_ENABLED 24 | 25 | IS_APPINVITE_ENABLED 26 | 27 | IS_GCM_ENABLED 28 | 29 | IS_SIGNIN_ENABLED 30 | 31 | GOOGLE_APP_ID 32 | 1:1032616268679:ios:58b73cb729d153a43db922 33 | 34 | -------------------------------------------------------------------------------- /macos/Runner/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 1032616268679-ie3269pqcqi2pj2dauc9l5d411ipo75f.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.1032616268679-ie3269pqcqi2pj2dauc9l5d411ipo75f 9 | API_KEY 10 | AIzaSyDtwlvIpAn7x6EGlBPNe3ybEIXU7ni6rWk 11 | GCM_SENDER_ID 12 | 1032616268679 13 | PLIST_VERSION 14 | 1 15 | BUNDLE_ID 16 | com.example.fluttersnips.RunnerTests 17 | PROJECT_ID 18 | flusnip 19 | STORAGE_BUCKET 20 | flusnip.appspot.com 21 | IS_ADS_ENABLED 22 | 23 | IS_ANALYTICS_ENABLED 24 | 25 | IS_APPINVITE_ENABLED 26 | 27 | IS_GCM_ENABLED 28 | 29 | IS_SIGNIN_ENABLED 30 | 31 | GOOGLE_APP_ID 32 | 1:1032616268679:ios:60d3348ee5d4dde23db922 33 | 34 | -------------------------------------------------------------------------------- /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 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | void RegisterPlugins(flutter::PluginRegistry* registry) { 17 | CloudFirestorePluginCApiRegisterWithRegistrar( 18 | registry->GetRegistrarForPlugin("CloudFirestorePluginCApi")); 19 | FirebaseAuthPluginCApiRegisterWithRegistrar( 20 | registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi")); 21 | FirebaseCorePluginCApiRegisterWithRegistrar( 22 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); 23 | RivePluginRegisterWithRegistrar( 24 | registry->GetRegistrarForPlugin("RivePlugin")); 25 | SharePlusWindowsPluginCApiRegisterWithRegistrar( 26 | registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); 27 | UrlLauncherWindowsRegisterWithRegistrar( 28 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 29 | } 30 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: fluttersnips 2 | description: A comprehensive component library for Flutter. 3 | 4 | publish_to: 'none' 5 | 6 | version: 1.0.0+1 7 | 8 | environment: 9 | sdk: '>=3.0.3 <4.0.0' 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | 15 | # a 16 | awesome_snackbar_content: ^0.1.3 17 | 18 | # c 19 | cupertino_icons: ^1.0.2 20 | cloud_firestore: ^4.8.2 21 | 22 | # f 23 | firebase_auth: ^4.6.3 24 | firebase_core: ^2.14.0 25 | flutter_inappwebview: ^5.7.2+3 26 | flutter_dotenv: ^5.1.0 27 | flutter_glow: ^0.3.0 28 | font_awesome_flutter: ^10.5.0 29 | 30 | # g 31 | glassy: ^0.0.6 32 | google_sign_in: ^6.1.4 33 | google_fonts: ^4.0.4 34 | go_router: ^9.0.0 35 | get: ^4.6.6 36 | get_it: ^7.6.4 37 | 38 | # p 39 | provider: ^6.0.5 40 | 41 | # r 42 | random_avatar: ^0.0.8 43 | rive: ^0.11.3 44 | 45 | # s 46 | selectable_code_view: ^0.0.1 47 | 48 | # u 49 | url_launcher: ^6.1.11 50 | url_strategy: ^0.2.0 51 | firebase_crashlytics: ^3.4.1 52 | carousel_slider: ^4.2.1 53 | smooth_page_indicator: ^1.1.0 54 | 55 | 56 | dev_dependencies: 57 | flutter_test: 58 | sdk: flutter 59 | 60 | flutter_lints: ^2.0.0 61 | 62 | flutter: 63 | uses-material-design: true 64 | assets: 65 | - assets/ 66 | - .env 67 | - assets/images/ 68 | - assets/images/sea.jpg 69 | 70 | -------------------------------------------------------------------------------- /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.Create(L"fluttersnips", 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 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "1032616268679", 4 | "project_id": "flusnip", 5 | "storage_bucket": "flusnip.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:1032616268679:android:6d901c1a5f72b7563db922", 11 | "android_client_info": { 12 | "package_name": "com.example.fluttersnips" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "1032616268679-1pcnevrefdtnkppcjeac1efnpqvustcu.apps.googleusercontent.com", 18 | "client_type": 3 19 | } 20 | ], 21 | "api_key": [ 22 | { 23 | "current_key": "AIzaSyCAKetGZ4I-bfdEsS_GwLgT2Xigucn3T9E" 24 | } 25 | ], 26 | "services": { 27 | "appinvite_service": { 28 | "other_platform_oauth_client": [ 29 | { 30 | "client_id": "1032616268679-1pcnevrefdtnkppcjeac1efnpqvustcu.apps.googleusercontent.com", 31 | "client_type": 3 32 | }, 33 | { 34 | "client_id": "1032616268679-bu6cftvsjkb6cluff96p4l9q9iqovnqi.apps.googleusercontent.com", 35 | "client_type": 2, 36 | "ios_info": { 37 | "bundle_id": "com.example.fluttersnips" 38 | } 39 | } 40 | ] 41 | } 42 | } 43 | } 44 | ], 45 | "configuration_version": "1" 46 | } -------------------------------------------------------------------------------- /lib/services/datafetch/firebase_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import '../../models/card_model.dart'; 5 | 6 | class FirebaseRepository { 7 | void saveCode(String title, String email, String code, String classT) { 8 | FirebaseFirestore.instance 9 | .collection('recents') 10 | .add({'title': title, 'email': email, 'code': code, 'classT': classT}); 11 | } 12 | 13 | Future> fetchRecentsFromFirestore() async { 14 | 15 | final CollectionReference collection = 16 | FirebaseFirestore.instance.collection('recents'); 17 | 18 | try { 19 | final QuerySnapshot snapshot = await collection.get(); 20 | final List recents = []; 21 | 22 | for (final DocumentSnapshot doc in snapshot.docs) { 23 | final Map? data = doc.data() as Map?; 24 | 25 | if (data != null) { 26 | final String email = data['email'] ?? ''; 27 | final String code = data['code'] ?? ''; 28 | final String classT = data['classT'] ?? ''; 29 | final String title = data['title'] ?? ''; 30 | 31 | final CardModel card = CardModel(email, code, classT, null, title); 32 | recents.add(card); 33 | } 34 | } 35 | 36 | return recents; 37 | } catch (e) { 38 | debugPrint('Error fetching recents: $e'); 39 | return []; 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /lib/screens/recently_added.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttersnips/shared/exports.dart'; 3 | 4 | class RecentlyAdded extends StatefulWidget { 5 | const RecentlyAdded({super.key}); 6 | 7 | @override 8 | State createState() => _RecentlyAddedState(); 9 | } 10 | 11 | class _RecentlyAddedState extends State { 12 | late Future> fetchDataFuture; 13 | 14 | @override 15 | void initState() { 16 | super.initState(); 17 | fetchDataFuture = _fetchDataFromFirestore(); 18 | } 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | return FutureBuilder>( 23 | future: fetchDataFuture, 24 | builder: (context, snapshot) { 25 | if (snapshot.connectionState == ConnectionState.waiting) { 26 | return const Center(child: CircularProgressIndicator()); 27 | } 28 | 29 | if (snapshot.hasError) { 30 | return Center(child: Text('Error: ${snapshot.error}')); 31 | } 32 | 33 | final fetchedData = snapshot.data; 34 | 35 | if (fetchedData == null || fetchedData.isEmpty) { 36 | return const Center(child: Text('No data available')); 37 | } 38 | 39 | return ShowCaseContent(crossAxisCount: 2, data: fetchedData); 40 | }, 41 | ); 42 | } 43 | 44 | Future> _fetchDataFromFirestore() async { 45 | final data = await FirebaseRepository().fetchRecentsFromFirestore(); 46 | return data; 47 | } 48 | } -------------------------------------------------------------------------------- /lib/shared/exports.dart: -------------------------------------------------------------------------------- 1 | // pub 2 | export 'package:get/get.dart'; 3 | export 'package:rive/rive.dart'; 4 | export 'package:provider/provider.dart'; 5 | export 'package:glassy/glassy_card.dart'; 6 | export 'package:go_router/go_router.dart'; 7 | export 'package:url_strategy/url_strategy.dart'; 8 | export 'package:google_fonts/google_fonts.dart'; 9 | 10 | // models 11 | export 'package:fluttersnips/models/card_model.dart'; 12 | 13 | // state managers 14 | export 'package:fluttersnips/providers/search_provider.dart'; 15 | export 'package:fluttersnips/providers/side_bar_provider.dart'; 16 | 17 | // misc 18 | export 'package:fluttersnips/app.dart'; 19 | export 'package:fluttersnips/main.dart'; 20 | export 'package:fluttersnips/shared/utils.dart'; 21 | export 'package:fluttersnips/screens/cards.dart'; 22 | export 'package:fluttersnips/screens/shapes.dart'; 23 | export 'package:fluttersnips/screens/web_view.dart'; 24 | export 'package:fluttersnips/screens/navigation.dart'; 25 | export 'package:fluttersnips/screens/buttons.dart'; 26 | export 'package:fluttersnips/widgets/body_content.dart'; 27 | export 'package:fluttersnips/widgets/side_menu_tile.dart'; 28 | export 'package:fluttersnips/screens/recently_added.dart'; 29 | export 'package:fluttersnips/widgets/no_results_found_for_query.dart'; 30 | export 'package:fluttersnips/services/datafetch/firebase_repository.dart'; 31 | export 'package:fluttersnips/widgets/wild_list/shapes/shape_wild_list.dart'; 32 | export 'package:fluttersnips/screens/showcase_content/presentation/showcase_content.dart'; 33 | -------------------------------------------------------------------------------- /macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.14' 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 | target 'RunnerTests' do 35 | inherit! :search_paths 36 | end 37 | end 38 | 39 | post_install do |installer| 40 | installer.pods_project.targets.each do |target| 41 | flutter_additional_macos_build_settings(target) 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '11.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | target 'RunnerTests' do 36 | inherit! :search_paths 37 | end 38 | end 39 | 40 | post_install do |installer| 41 | installer.pods_project.targets.each do |target| 42 | flutter_additional_ios_build_settings(target) 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:firebase_core/firebase_core.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_dotenv/flutter_dotenv.dart'; 6 | import 'package:fluttersnips/firebase_options.dart'; 7 | import 'package:fluttersnips/services/auth/auth_repository.dart'; 8 | import 'package:firebase_crashlytics/firebase_crashlytics.dart'; 9 | import 'package:fluttersnips/shared/exports.dart'; 10 | import 'package:get_it/get_it.dart'; 11 | 12 | Future initApp() async { 13 | WidgetsFlutterBinding.ensureInitialized(); 14 | await Firebase.initializeApp( 15 | options: DefaultFirebaseOptions.currentPlatform, 16 | ); 17 | await dotenv.load(fileName: '.env'); 18 | await authRepositoryInstance.isLoggedIn(); 19 | setPathUrlStrategy(); 20 | registerSingletons(); 21 | } 22 | 23 | void main() async { 24 | // This captures errors reported by the Flutter framework. 25 | runZonedGuarded>( 26 | () async { 27 | await initApp(); 28 | runApp(const App()); 29 | }, 30 | (error, stack) => FirebaseCrashlytics.instance.recordError( 31 | error, 32 | stack, 33 | fatal: true, 34 | ), 35 | ); 36 | } 37 | 38 | Future registerSingletons() async { 39 | GetIt.I.registerSingleton(Get.put(SideBarProvider())); 40 | GetIt.I.registerSingleton(Get.put(SearchProvider())); 41 | } 42 | 43 | // Syntatic sugar for common state manager classes 44 | SideBarProvider get sideBarProvider => GetIt.I.get(); 45 | SearchProvider get searchProvider => GetIt.I.get(); 46 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 14 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /.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: f92f44110e87bad5ff168335c36da6f6053036e6 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: f92f44110e87bad5ff168335c36da6f6053036e6 17 | base_revision: f92f44110e87bad5ff168335c36da6f6053036e6 18 | - platform: android 19 | create_revision: f92f44110e87bad5ff168335c36da6f6053036e6 20 | base_revision: f92f44110e87bad5ff168335c36da6f6053036e6 21 | - platform: ios 22 | create_revision: f92f44110e87bad5ff168335c36da6f6053036e6 23 | base_revision: f92f44110e87bad5ff168335c36da6f6053036e6 24 | - platform: linux 25 | create_revision: f92f44110e87bad5ff168335c36da6f6053036e6 26 | base_revision: f92f44110e87bad5ff168335c36da6f6053036e6 27 | - platform: macos 28 | create_revision: f92f44110e87bad5ff168335c36da6f6053036e6 29 | base_revision: f92f44110e87bad5ff168335c36da6f6053036e6 30 | - platform: web 31 | create_revision: f92f44110e87bad5ff168335c36da6f6053036e6 32 | base_revision: f92f44110e87bad5ff168335c36da6f6053036e6 33 | - platform: windows 34 | create_revision: f92f44110e87bad5ff168335c36da6f6053036e6 35 | base_revision: f92f44110e87bad5ff168335c36da6f6053036e6 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 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Fluttersnips 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | fluttersnips 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | UIApplicationSupportsIndirectInputEvents 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /lib/widgets/search_box.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:fluttersnips/shared/exports.dart'; 4 | 5 | class SearchBox extends StatefulWidget { 6 | const SearchBox({Key? key}) : super(key: key); 7 | 8 | @override 9 | State createState() => _SearchBoxState(); 10 | } 11 | 12 | class _SearchBoxState extends State { 13 | final TextEditingController _searchController = TextEditingController(); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return ClipRRect( 18 | borderRadius: BorderRadius.circular(100), 19 | child: TextField( 20 | textAlign: TextAlign.center, 21 | controller: _searchController, 22 | style: GoogleFonts.poppins(fontSize: 15), 23 | onChanged: (value) { 24 | searchProvider.query.value = value; 25 | initiateSearch(); 26 | }, 27 | decoration: InputDecoration( 28 | filled: true, 29 | border: InputBorder.none, 30 | fillColor: Color(0xFF202020), 31 | hintText: 'Search', 32 | hintStyle: GoogleFonts.poppins( 33 | fontSize: 15, 34 | color: Color(0xFF838383), 35 | ), 36 | prefixIcon: const Padding( 37 | padding: EdgeInsets.only(left: 4.0), 38 | child: Icon(CupertinoIcons.search, size: 18), 39 | ), 40 | suffixIcon: Padding( 41 | padding: EdgeInsets.only(right: 4.0), 42 | child: IconButton( 43 | iconSize: 18, 44 | icon: const Icon(Icons.clear), 45 | onPressed: () => _searchController.clear(), 46 | ), 47 | ), 48 | ), 49 | ), 50 | ); 51 | } 52 | 53 | void initiateSearch() => searchProvider.search(); 54 | 55 | @override 56 | void dispose() { 57 | _searchController.dispose(); 58 | super.dispose(); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /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 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") 37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 38 | 39 | # Run the Flutter tool portions of the build. This must not be removed. 40 | add_dependencies(${BINARY_NAME} flutter_assemble) 41 | -------------------------------------------------------------------------------- /lib/widgets/main_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttersnips/screens/cards.dart'; 3 | import 'package:fluttersnips/screens/carousel.dart'; 4 | import 'package:fluttersnips/screens/columns.dart'; 5 | import 'package:fluttersnips/screens/intro_page.dart'; 6 | import 'package:fluttersnips/screens/layouts.dart'; 7 | import 'package:fluttersnips/screens/navigation.dart'; 8 | import 'package:fluttersnips/screens/recently_added.dart'; 9 | import 'package:fluttersnips/screens/shapes.dart'; 10 | import 'package:fluttersnips/screens/web_view.dart'; 11 | import 'package:fluttersnips/shared/exports.dart'; 12 | import 'package:fluttersnips/widgets/nav_bar/presentation/nav_bar.dart'; 13 | 14 | class MainView extends StatelessWidget { 15 | const MainView({super.key}); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Stack( 20 | children: [ 21 | // body 22 | Consumer( 23 | builder: (context, value, child) { 24 | switch (value.currentTab) { 25 | case 0: 26 | return const RecentlyAdded(); 27 | 28 | // ignore: constant_pattern_never_matches_value_type 29 | case 1: 30 | return const Cards(); 31 | 32 | case 2: 33 | return const Shapes(); 34 | 35 | case 3: 36 | return Navigation(); 37 | 38 | case 4: 39 | return const WebView(); 40 | 41 | case 5: 42 | return const Columns(); 43 | 44 | case 6: 45 | return const Buttons(); 46 | 47 | case 7: 48 | return const Layouts(); 49 | 50 | case 8: 51 | return const Carousel(); 52 | 53 | default: 54 | return const IntroPage(); 55 | } 56 | }, 57 | ), 58 | 59 | // header 60 | const NavBar(), 61 | ], 62 | ); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /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 | -1; // remove the trailing null character 52 | int input_length = (int)wcslen(utf16_string); 53 | std::string utf8_string; 54 | if (target_length <= 0 || target_length > utf8_string.max_size()) { 55 | return utf8_string; 56 | } 57 | utf8_string.resize(target_length); 58 | int converted_length = ::WideCharToMultiByte( 59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 60 | input_length, utf8_string.data(), target_length, nullptr, nullptr); 61 | if (converted_length == 0) { 62 | return std::string(); 63 | } 64 | return utf8_string; 65 | } 66 | -------------------------------------------------------------------------------- /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 | 30 | flutter_controller_->engine()->SetNextFrameCallback([&]() { 31 | this->Show(); 32 | }); 33 | 34 | return true; 35 | } 36 | 37 | void FlutterWindow::OnDestroy() { 38 | if (flutter_controller_) { 39 | flutter_controller_ = nullptr; 40 | } 41 | 42 | Win32Window::OnDestroy(); 43 | } 44 | 45 | LRESULT 46 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 47 | WPARAM const wparam, 48 | LPARAM const lparam) noexcept { 49 | // Give Flutter, including plugins, an opportunity to handle window messages. 50 | if (flutter_controller_) { 51 | std::optional result = 52 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 53 | lparam); 54 | if (result) { 55 | return *result; 56 | } 57 | } 58 | 59 | switch (message) { 60 | case WM_FONTCHANGE: 61 | flutter_controller_->engine()->ReloadSystemFonts(); 62 | break; 63 | } 64 | 65 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 66 | } 67 | -------------------------------------------------------------------------------- /lib/widgets/side_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttersnips/router.dart'; 3 | import 'package:fluttersnips/shared/exports.dart'; 4 | 5 | class SideBar extends StatelessWidget { 6 | const SideBar({super.key}); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | color: const Color(0xFF101010), 12 | child: Column( 13 | crossAxisAlignment: CrossAxisAlignment.start, 14 | children: [ 15 | const SizedBox(height: 20), 16 | Padding( 17 | padding: const EdgeInsets.symmetric(horizontal: 20), 18 | child: Text( 19 | 'Flutter Snips.', 20 | style: GoogleFonts.poppins( 21 | fontSize: 20, 22 | fontWeight: FontWeight.w700, 23 | ), 24 | ), 25 | ), 26 | const SizedBox(height: 8), 27 | const Divider(color: Colors.grey, thickness: 0.2), 28 | const SizedBox(height: 30), 29 | Container( 30 | padding: const EdgeInsets.only(right: 10.0), 31 | child: ListView.separated( 32 | shrinkWrap: true, 33 | scrollDirection: Axis.vertical, 34 | itemCount: sideBarProvider.tabs.length, 35 | separatorBuilder: (context, index) => const SizedBox(height: 4), 36 | itemBuilder: (context, index) { 37 | final tab = sideBarProvider.tabs[index]; 38 | return Obx(() { 39 | return SideMenuTile( 40 | title: tab.title, 41 | iconData: tab.iconData, 42 | isSelected: sideBarProvider.currentTab.value == index, 43 | onTap: () { 44 | sideBarProvider.setCurrentTab(index); 45 | Utils.updateSearchIndex(index); 46 | router.goNamed( 47 | tab.title.toLowerCase().replaceAll(' ', '-'), 48 | ); 49 | }, 50 | ); 51 | }); 52 | }, 53 | ), 54 | ) 55 | ], 56 | ), 57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/widgets/side_menu_tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttersnips/constants/app_colors.dart'; 3 | import 'package:fluttersnips/shared/exports.dart'; 4 | 5 | class SideMenuTile extends StatefulWidget { 6 | final String title; 7 | final IconData iconData; 8 | final VoidCallback onTap; 9 | final bool isSelected; 10 | const SideMenuTile( 11 | {super.key, 12 | required this.title, 13 | required this.iconData, 14 | required this.onTap, 15 | required this.isSelected}); 16 | 17 | @override 18 | State createState() => _SideMenuTileState(); 19 | } 20 | 21 | class _SideMenuTileState extends State { 22 | bool hovering = false; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return InkWell( 27 | onTap: widget.onTap, 28 | child: MouseRegion( 29 | onEnter: (event) => setState(() => hovering = true), 30 | onExit: (event) => setState(() => hovering = false), 31 | child: AnimatedContainer( 32 | duration: const Duration(milliseconds: 150), 33 | padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 18), 34 | decoration: BoxDecoration( 35 | color: hovering 36 | ? Colors.grey[900] 37 | : widget.isSelected 38 | ? Colors.grey[900] 39 | : Colors.transparent, 40 | borderRadius: 41 | const BorderRadius.horizontal(right: Radius.circular(100)), 42 | ), 43 | child: Row( 44 | mainAxisSize: MainAxisSize.min, 45 | children: [ 46 | Icon( 47 | widget.iconData, 48 | color: widget.isSelected ? primaryColor : Colors.white, 49 | ), 50 | const SizedBox(width: 14), 51 | Text( 52 | widget.title, 53 | style: GoogleFonts.poppins( 54 | fontSize: 14, 55 | fontWeight: FontWeight.w500, 56 | color: widget.isSelected ? primaryColor : Colors.grey[300], 57 | ), 58 | ), 59 | ], 60 | ), 61 | ), 62 | ), 63 | ); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /lib/widgets/wild_list/web_view/web_view_wild_list.dart: -------------------------------------------------------------------------------- 1 | 2 | // need to be tested 3 | 4 | 5 | // import 'package:flutter/material.dart'; 6 | // import 'package:flutter_inappwebview/flutter_inappwebview.dart'; 7 | // import 'package:provider/provider.dart'; 8 | 9 | // import 'package:ptuepapers/controller/utilscontroller.dart'; 10 | 11 | // class InAppBrowserPage extends StatefulWidget { 12 | // final urlWeb; 13 | // const InAppBrowserPage({required this.urlWeb, Key? key}) : super(key: key); 14 | 15 | // @override 16 | // State createState() => _InAppBrowserPageState(); 17 | // } 18 | 19 | // class _InAppBrowserPageState extends State { 20 | // // double _progress = 0; 21 | // late InAppWebViewController webView; 22 | // GlobalKey scaffoldKey = GlobalKey(); 23 | 24 | // @override 25 | // Widget build(BuildContext context) { 26 | // return Scaffold( 27 | // key: scaffoldKey, 28 | // body: SafeArea( 29 | // child: Stack( 30 | // children: [ 31 | // InAppWebView( 32 | // initialUrlRequest: URLRequest(url: Uri.parse(widget.urlWeb)), 33 | // onWebViewCreated: (InAppWebViewController controller) { 34 | // webView = controller; 35 | // }, 36 | // onProgressChanged: 37 | // (InAppWebViewController controller, int progress) { 38 | // Provider.of(context, listen: false) 39 | // .progreessBar(progress / 100); 40 | // }, 41 | // ), 42 | // Consumer( 43 | // builder: ((context, value, child) { 44 | // return value.progress < 1 45 | // ? SizedBox( 46 | // height: 3, 47 | // child: LinearProgressIndicator( 48 | // value: value.progress, 49 | // backgroundColor: Theme.of(context) 50 | // .colorScheme 51 | // .secondary 52 | // .withOpacity(0.2), 53 | // // valueColor: AlwaysStoppedAnimation(Colors.redAccent), 54 | // ), 55 | // ) 56 | // : const SizedBox(); 57 | // }), 58 | // ), 59 | // ], 60 | // ), 61 | // ), 62 | // ); 63 | // } 64 | // } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | namespace "com.example.fluttersnips" 30 | compileSdkVersion flutter.compileSdkVersion 31 | ndkVersion flutter.ndkVersion 32 | 33 | compileOptions { 34 | sourceCompatibility JavaVersion.VERSION_1_8 35 | targetCompatibility JavaVersion.VERSION_1_8 36 | } 37 | 38 | kotlinOptions { 39 | jvmTarget = '1.8' 40 | } 41 | 42 | sourceSets { 43 | main.java.srcDirs += 'src/main/kotlin' 44 | } 45 | 46 | defaultConfig { 47 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 48 | applicationId "com.example.fluttersnips" 49 | // You can update the following values to match your application needs. 50 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 51 | minSdkVersion flutter.minSdkVersion 52 | targetSdkVersion flutter.targetSdkVersion 53 | versionCode flutterVersionCode.toInteger() 54 | versionName flutterVersionName 55 | } 56 | 57 | buildTypes { 58 | release { 59 | // TODO: Add your own signing config for the release build. 60 | // Signing with the debug keys for now, so `flutter run --release` works. 61 | signingConfig signingConfigs.debug 62 | } 63 | } 64 | } 65 | 66 | flutter { 67 | source '../..' 68 | } 69 | 70 | dependencies { 71 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 72 | } 73 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Fluttersnips 2 | 3 | Thank you for considering contributing to Fluttersnips! We welcome contributions from developers of all skill levels. By contributing to this project, you help make Flutter development more accessible and efficient for everyone. Here are some guidelines to help you get started. 4 | 5 | ## Table of Contents 6 | 7 | - [How to Contribute](#how-to-contribute) 8 | - [Getting Started](#getting-started) 9 | - [Development Setup](#development-setup) 10 | - [Creating Issues](#creating-issues) 11 | - [Making Pull Requests](#making-pull-requests) 12 | - [License](#license) 13 | 14 | ## How to Contribute 15 | 16 | 1. Fork the repository to your GitHub account. 17 | 2. Clone your forked repository to your local machine. 18 | 3. Create a new branch for your contribution: `git checkout -b feature/your-feature-name`. 19 | 4. Make your changes and commit them with a clear and concise commit message. 20 | 5. Push your changes to your fork on GitHub: `git push origin feature/your-feature-name`. 21 | 6. Create a pull request (PR) to the `main` branch of this repository. 22 | 7. Ensure your PR title and description are informative. 23 | 24 | ## Getting Started 25 | 26 | Before contributing, make sure you have [Flutter](https://flutter.dev/docs/get-started/install) and [Dart](https://dart.dev/get-dart) installed on your system. 27 | 28 | ## Development Setup 29 | 30 | Go through [ReadMe](https://fluttersnips.vercel.app/) you will get to know about every thing. 31 | 32 | You're ready to start coding! Make your changes in the relevant files. 33 | 34 | ## Creating Issues 35 | If you find a bug, have a feature request, or want to suggest an improvement, please create an issue on GitHub. When creating an issue, please provide detailed information about the problem or suggestion. 36 | 37 | ## Making Pull Requests 38 | When submitting a pull request: 39 | 40 | Make sure your code is well-tested and follows the project's code style. 41 | Ensure your branch is up to date with the latest changes from the main branch. 42 | Provide a clear and concise description of your changes in the PR description. 43 | If your PR fixes an issue, reference the issue in the description. 44 | Code Style 45 | Please follow the Flutter and Dart code style guidelines. Use consistent indentation, meaningful variable names, and comment your code as needed for clarity. 46 | 47 | ## License 48 | By contributing to Fluttersnips, you agree that your contributions will be licensed under the MIT License. 49 | 50 | Happy coding, and thank you for contributing to Fluttersnips! 51 | 52 | 53 | 54 | Make sure to place this `CONTRIBUTING.md` file in the root directory of your repository. Contributors will find this document helpful when they want to contribute to your project. 55 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 39 | 40 | 41 | 42 | 47 | 48 | 49 | 50 | 51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | 62 | 63 | 64 | 65 | 66 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /web/styles.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | height: 100%; 4 | width: 100%; 5 | background-color: #000000; 6 | } 7 | 8 | .center { 9 | align-items: center; 10 | display: flex; 11 | justify-content: center; 12 | height: 100%; 13 | width: 100%; 14 | } 15 | 16 | 17 | 18 | .sk-chase { 19 | width: 40px; 20 | height: 40px; 21 | position: relative; 22 | left: 0; 23 | right: 0; 24 | top: 0; 25 | bottom: 0; 26 | animation: sk-chase 2.5s infinite linear both; 27 | } 28 | 29 | .sk-chase-dot { 30 | width: 100%; 31 | height: 100%; 32 | position: absolute; 33 | left: 0; 34 | top: 0; 35 | animation: sk-chase-dot 2.0s infinite ease-in-out both; 36 | } 37 | 38 | .sk-chase-dot:before { 39 | content: ''; 40 | display: block; 41 | width: 25%; 42 | height: 25%; 43 | background-color: #66D7D1; 44 | border-radius: 100%; 45 | animation: sk-chase-dot-before 2.0s infinite ease-in-out both; 46 | } 47 | 48 | .sk-chase-dot:nth-child(1) { 49 | animation-delay: -1.1s; 50 | } 51 | 52 | .sk-chase-dot:nth-child(2) { 53 | animation-delay: -1.0s; 54 | } 55 | 56 | .sk-chase-dot:nth-child(3) { 57 | animation-delay: -0.9s; 58 | } 59 | 60 | .sk-chase-dot:nth-child(4) { 61 | animation-delay: -0.8s; 62 | } 63 | 64 | .sk-chase-dot:nth-child(5) { 65 | animation-delay: -0.7s; 66 | } 67 | 68 | .sk-chase-dot:nth-child(6) { 69 | animation-delay: -0.6s; 70 | } 71 | 72 | .sk-chase-dot:nth-child(1):before { 73 | animation-delay: -1.1s; 74 | } 75 | 76 | .sk-chase-dot:nth-child(2):before { 77 | animation-delay: -1.0s; 78 | } 79 | 80 | .sk-chase-dot:nth-child(3):before { 81 | animation-delay: -0.9s; 82 | } 83 | 84 | .sk-chase-dot:nth-child(4):before { 85 | animation-delay: -0.8s; 86 | } 87 | 88 | .sk-chase-dot:nth-child(5):before { 89 | animation-delay: -0.7s; 90 | } 91 | 92 | .sk-chase-dot:nth-child(6):before { 93 | animation-delay: -0.6s; 94 | } 95 | 96 | @keyframes sk-chase { 97 | 100% { 98 | transform: rotate(360deg); 99 | } 100 | } 101 | 102 | @keyframes sk-chase-dot { 103 | 80%, 104 | 100% { 105 | transform: rotate(360deg); 106 | } 107 | } 108 | 109 | @keyframes sk-chase-dot-before { 110 | 50% { 111 | transform: scale(0.4); 112 | } 113 | 100%, 114 | 0% { 115 | transform: scale(1.0); 116 | } 117 | } 118 | .loader, 119 | .loader::after { 120 | width: 100px; 121 | height: 100px; 122 | border-radius: 50%; 123 | background-image: linear-gradient(45deg, red, blue); 124 | position: relative; 125 | z-index: 1; 126 | animation: rotate 2s linear infinite; 127 | } 128 | 129 | .loader::after { 130 | content: ""; 131 | filter: blur(40px); 132 | display: block; 133 | position: relative; 134 | z-index: -1; 135 | } 136 | 137 | @keyframes rotate { 138 | from { 139 | transform: rotateZ(0deg); 140 | } 141 | to { 142 | transform: rotateZ(360deg); 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/firebase_options.dart: -------------------------------------------------------------------------------- 1 | // File generated by FlutterFire CLI. 2 | // ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members 3 | import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; 4 | import 'package:flutter/foundation.dart' 5 | show defaultTargetPlatform, kIsWeb, TargetPlatform; 6 | 7 | /// Default [FirebaseOptions] for use with your Firebase apps. 8 | /// 9 | /// Example: 10 | /// ```dart 11 | /// import 'firebase_options.dart'; 12 | /// // ... 13 | /// await Firebase.initializeApp( 14 | /// options: DefaultFirebaseOptions.currentPlatform, 15 | /// ); 16 | /// ``` 17 | class DefaultFirebaseOptions { 18 | static FirebaseOptions get currentPlatform { 19 | if (kIsWeb) { 20 | return web; 21 | } 22 | switch (defaultTargetPlatform) { 23 | case TargetPlatform.android: 24 | return android; 25 | case TargetPlatform.iOS: 26 | return ios; 27 | case TargetPlatform.macOS: 28 | return macos; 29 | case TargetPlatform.windows: 30 | throw UnsupportedError( 31 | 'DefaultFirebaseOptions have not been configured for windows - ' 32 | 'you can reconfigure this by running the FlutterFire CLI again.', 33 | ); 34 | case TargetPlatform.linux: 35 | throw UnsupportedError( 36 | 'DefaultFirebaseOptions have not been configured for linux - ' 37 | 'you can reconfigure this by running the FlutterFire CLI again.', 38 | ); 39 | default: 40 | throw UnsupportedError( 41 | 'DefaultFirebaseOptions are not supported for this platform.', 42 | ); 43 | } 44 | } 45 | 46 | static const FirebaseOptions web = FirebaseOptions( 47 | apiKey: 'AIzaSyASFN5ICc-5dnpiaMjlDA7tbdCnmKTPRUk', 48 | appId: '1:1032616268679:web:16c80548406fbf803db922', 49 | messagingSenderId: '1032616268679', 50 | projectId: 'flusnip', 51 | authDomain: 'flusnip.firebaseapp.com', 52 | storageBucket: 'flusnip.appspot.com', 53 | ); 54 | 55 | static const FirebaseOptions android = FirebaseOptions( 56 | apiKey: 'AIzaSyCAKetGZ4I-bfdEsS_GwLgT2Xigucn3T9E', 57 | appId: '1:1032616268679:android:6d901c1a5f72b7563db922', 58 | messagingSenderId: '1032616268679', 59 | projectId: 'flusnip', 60 | storageBucket: 'flusnip.appspot.com', 61 | ); 62 | 63 | static const FirebaseOptions ios = FirebaseOptions( 64 | apiKey: 'AIzaSyDtwlvIpAn7x6EGlBPNe3ybEIXU7ni6rWk', 65 | appId: '1:1032616268679:ios:58b73cb729d153a43db922', 66 | messagingSenderId: '1032616268679', 67 | projectId: 'flusnip', 68 | storageBucket: 'flusnip.appspot.com', 69 | iosClientId: '1032616268679-bu6cftvsjkb6cluff96p4l9q9iqovnqi.apps.googleusercontent.com', 70 | iosBundleId: 'com.example.fluttersnips', 71 | ); 72 | 73 | static const FirebaseOptions macos = FirebaseOptions( 74 | apiKey: 'AIzaSyDtwlvIpAn7x6EGlBPNe3ybEIXU7ni6rWk', 75 | appId: '1:1032616268679:ios:60d3348ee5d4dde23db922', 76 | messagingSenderId: '1032616268679', 77 | projectId: 'flusnip', 78 | storageBucket: 'flusnip.appspot.com', 79 | iosClientId: '1032616268679-ie3269pqcqi2pj2dauc9l5d411ipo75f.apps.googleusercontent.com', 80 | iosBundleId: 'com.example.fluttersnips.RunnerTests', 81 | ); 82 | } 83 | -------------------------------------------------------------------------------- /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 | #if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) 64 | #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0,0 67 | #endif 68 | 69 | #if defined(FLUTTER_VERSION) 70 | #define VERSION_AS_STRING FLUTTER_VERSION 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", "fluttersnips" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "fluttersnips" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2023 com.example. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "fluttersnips.exe" "\0" 98 | VALUE "ProductName", "fluttersnips" "\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 | -------------------------------------------------------------------------------- /lib/widgets/wild_list/buttons/button_wild_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Button1 extends StatelessWidget { 4 | const Button1({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return TextButton( 9 | onPressed: () {}, 10 | style: ElevatedButton.styleFrom( 11 | backgroundColor: const Color.fromARGB(255, 0, 194, 203), 12 | fixedSize: const Size(200, 50), 13 | shape: RoundedRectangleBorder( 14 | borderRadius: BorderRadius.circular(11))), 15 | child: const Text( 16 | "Elevated Button", 17 | style: TextStyle(color: Color.fromARGB(255, 255, 255, 255)), 18 | )); 19 | } 20 | } 21 | 22 | class Button2 extends StatelessWidget { 23 | const Button2({super.key}); 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return TextButton( 28 | onPressed: () {}, 29 | style: TextButton.styleFrom( 30 | fixedSize: const Size(200, 50), 31 | shape: RoundedRectangleBorder( 32 | borderRadius: BorderRadius.circular(50))), 33 | child: const Text( 34 | 'Text Button', 35 | style: TextStyle(color: Color.fromARGB(255, 0, 194, 203)), 36 | )); 37 | } 38 | } 39 | 40 | class Button3 extends StatelessWidget { 41 | const Button3({super.key}); 42 | 43 | @override 44 | Widget build(BuildContext context) { 45 | return OutlinedButton( 46 | onPressed: () {}, 47 | style: OutlinedButton.styleFrom( 48 | fixedSize: const Size(200, 50), 49 | shape: RoundedRectangleBorder( 50 | side: const BorderSide( 51 | color: Color.fromARGB(255, 20, 216, 226), 52 | ), 53 | borderRadius: BorderRadius.circular(50))), 54 | child: const Text( 55 | "Outlined Button", 56 | style: TextStyle(color: Color.fromARGB(255, 0, 194, 203)), 57 | )); 58 | } 59 | } 60 | 61 | class Button4 extends StatefulWidget { 62 | const Button4({super.key}); 63 | 64 | @override 65 | State createState() => _Button4State(); 66 | } 67 | 68 | class _Button4State extends State { 69 | bool _isLoading = false; 70 | @override 71 | Widget build(BuildContext context) { 72 | return ElevatedButton( 73 | onPressed: () async { 74 | setState(() => _isLoading = true); 75 | await Future.delayed(const Duration(seconds: 3)); 76 | setState(() => _isLoading = false); 77 | }, 78 | style: ElevatedButton.styleFrom( 79 | backgroundColor: const Color.fromARGB(255, 0, 194, 203), 80 | fixedSize: const Size(200, 50), 81 | shape: 82 | RoundedRectangleBorder(borderRadius: BorderRadius.circular(50))), 83 | child: _isLoading 84 | // ignore: sized_box_for_whitespace 85 | ? Container( 86 | width: 200, 87 | height: 100, 88 | child: const Row( 89 | children: [ 90 | CircularProgressIndicator( 91 | color: Colors.white, 92 | ), 93 | SizedBox(width: 10), 94 | Text('Please wait...', 95 | style: TextStyle( 96 | fontSize: 15, 97 | // fontWeight: FontWeight.w600, 98 | color: Color.fromARGB(255, 255, 255, 255))) 99 | ], 100 | ), 101 | ) 102 | : const Text("Animated Button", 103 | style: TextStyle( 104 | fontSize: 15, 105 | // fontWeight: FontWeight.w600, 106 | color: Color.fromARGB(255, 255, 255, 255))), 107 | ); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /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 a win32 window with |title| that is positioned and sized 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 this function will scale the inputted width and height as 35 | // as appropriate for the default monitor. The window is invisible until 36 | // |Show| is called. Returns true if the window was created successfully. 37 | bool Create(const std::wstring& title, const Point& origin, const Size& size); 38 | 39 | // Show the current window. Returns true if the window was successfully shown. 40 | bool Show(); 41 | 42 | // Release OS resources associated with window. 43 | void Destroy(); 44 | 45 | // Inserts |content| into the window tree. 46 | void SetChildContent(HWND content); 47 | 48 | // Returns the backing Window handle to enable clients to set icon and other 49 | // window properties. Returns nullptr if the window has been destroyed. 50 | HWND GetHandle(); 51 | 52 | // If true, closing this window will quit the application. 53 | void SetQuitOnClose(bool quit_on_close); 54 | 55 | // Return a RECT representing the bounds of the current client area. 56 | RECT GetClientArea(); 57 | 58 | protected: 59 | // Processes and route salient window messages for mouse handling, 60 | // size change and DPI. Delegates handling of these to member overloads that 61 | // inheriting classes can handle. 62 | virtual LRESULT MessageHandler(HWND window, 63 | UINT const message, 64 | WPARAM const wparam, 65 | LPARAM const lparam) noexcept; 66 | 67 | // Called when CreateAndShow is called, allowing subclass window-related 68 | // setup. Subclasses should return false if setup fails. 69 | virtual bool OnCreate(); 70 | 71 | // Called when Destroy is called. 72 | virtual void OnDestroy(); 73 | 74 | private: 75 | friend class WindowClassRegistrar; 76 | 77 | // OS callback called by message pump. Handles the WM_NCCREATE message which 78 | // is passed when the non-client area is being created and enables automatic 79 | // non-client DPI scaling so that the non-client area automatically 80 | // responds to changes in DPI. All other messages are handled by 81 | // MessageHandler. 82 | static LRESULT CALLBACK WndProc(HWND const window, 83 | UINT const message, 84 | WPARAM const wparam, 85 | LPARAM const lparam) noexcept; 86 | 87 | // Retrieves a class instance pointer for |window| 88 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 89 | 90 | // Update the window frame's theme to match the system theme. 91 | static void UpdateTheme(HWND const window); 92 | 93 | bool quit_on_close_ = false; 94 | 95 | // window handle for top level window. 96 | HWND window_handle_ = nullptr; 97 | 98 | // window handle for hosted content. 99 | HWND child_content_ = nullptr; 100 | }; 101 | 102 | #endif // RUNNER_WIN32_WINDOW_H_ 103 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /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, "fluttersnips"); 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, "fluttersnips"); 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 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.14) 3 | project(fluttersnips LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "fluttersnips") 8 | 9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 10 | # versions of CMake. 11 | cmake_policy(SET CMP0063 NEW) 12 | 13 | # Define build configuration option. 14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 15 | if(IS_MULTICONFIG) 16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 17 | CACHE STRING "" FORCE) 18 | else() 19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 20 | set(CMAKE_BUILD_TYPE "Debug" CACHE 21 | STRING "Flutter build mode" FORCE) 22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 23 | "Debug" "Profile" "Release") 24 | endif() 25 | endif() 26 | # Define settings for the Profile build mode. 27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 31 | 32 | # Use Unicode for all projects. 33 | add_definitions(-DUNICODE -D_UNICODE) 34 | 35 | # Compilation settings that should be applied to most targets. 36 | # 37 | # Be cautious about adding new options here, as plugins use this function by 38 | # default. In most cases, you should add new options to specific targets instead 39 | # of modifying this function. 40 | function(APPLY_STANDARD_SETTINGS TARGET) 41 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 43 | target_compile_options(${TARGET} PRIVATE /EHsc) 44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 46 | endfunction() 47 | 48 | # Flutter library and tool build rules. 49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 50 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 51 | 52 | # Application build; see runner/CMakeLists.txt. 53 | add_subdirectory("runner") 54 | 55 | 56 | # Generated plugin build rules, which manage building the plugins and adding 57 | # them to the application. 58 | include(flutter/generated_plugins.cmake) 59 | 60 | 61 | # === Installation === 62 | # Support files are copied into place next to the executable, so that it can 63 | # run in place. This is done instead of making a separate bundle (as on Linux) 64 | # so that building and running from within Visual Studio will work. 65 | set(BUILD_BUNDLE_DIR "$") 66 | # Make the "install" step default, as it's required to run. 67 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 68 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 69 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 70 | endif() 71 | 72 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 73 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 74 | 75 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 76 | COMPONENT Runtime) 77 | 78 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 79 | COMPONENT Runtime) 80 | 81 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 82 | COMPONENT Runtime) 83 | 84 | if(PLUGIN_BUNDLED_LIBRARIES) 85 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 86 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 87 | COMPONENT Runtime) 88 | endif() 89 | 90 | # Fully re-copy the assets directory on each build to avoid having stale files 91 | # from a previous install. 92 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 93 | install(CODE " 94 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 95 | " COMPONENT Runtime) 96 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 97 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 98 | 99 | # Install the AOT library on non-Debug builds only. 100 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 101 | CONFIGURATIONS Profile;Release 102 | COMPONENT Runtime) 103 | -------------------------------------------------------------------------------- /lib/widgets/wild_list/buttons/button_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttersnips/models/card_model.dart'; 3 | import 'package:fluttersnips/widgets/wild_list/buttons/button_wild_list.dart'; 4 | 5 | const List buttonListW = [ 6 | CardModel( 7 | 'sarangabhavani1231@gmail.com', 8 | '''class Button1 extends StatelessWidget { 9 | const Button1({super.key}); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return TextButton( 14 | onPressed: () {}, 15 | style: ElevatedButton.styleFrom( 16 | backgroundColor: const Color.fromARGB(255, 0, 194, 203), 17 | fixedSize: const Size(200, 50), 18 | shape: RoundedRectangleBorder( 19 | borderRadius: BorderRadius.circular(11))), 20 | child: const Text( 21 | "Elevated Button", 22 | style: TextStyle(color: Color.fromARGB(255, 255, 255, 255)), 23 | )); 24 | } 25 | } 26 | 27 | ''', 28 | 'Button', 29 | Button1(), 30 | 'ElevatedButton', 31 | ), 32 | CardModel( 33 | 'sarangabhavani1231@gmail.com', 34 | '''class Button2 extends StatelessWidget { 35 | const Button2({super.key}); 36 | 37 | @override 38 | Widget build(BuildContext context) { 39 | return TextButton( 40 | onPressed: () {}, 41 | style: TextButton.styleFrom( 42 | fixedSize: const Size(200, 50), 43 | shape: RoundedRectangleBorder( 44 | borderRadius: BorderRadius.circular(50))), 45 | child: const Text( 46 | 'Text Button', 47 | style: TextStyle(color: Color.fromARGB(255, 0, 194, 203)), 48 | )); 49 | } 50 | } 51 | 52 | ''', 53 | 'Button', 54 | Button2(), 55 | 'TextButton', 56 | ), 57 | CardModel( 58 | 'sarangabhavani1231@gmail.com', 59 | ''' 60 | class Button3 extends StatelessWidget { 61 | const Button3({super.key}); 62 | 63 | @override 64 | Widget build(BuildContext context) { 65 | return OutlinedButton( 66 | onPressed: () {}, 67 | style: OutlinedButton.styleFrom( 68 | fixedSize: const Size(200, 50), 69 | shape: RoundedRectangleBorder( 70 | side: const BorderSide( 71 | color: Color.fromARGB(255, 20, 216, 226), 72 | ), 73 | borderRadius: BorderRadius.circular(50))), 74 | child: const Text( 75 | "Outlined Button", 76 | style: TextStyle(color: Color.fromARGB(255, 0, 194, 203)), 77 | )); 78 | } 79 | } 80 | ''', 81 | 'Button', 82 | Button3(), 83 | 'OutlinedButton', 84 | ), 85 | CardModel( 86 | 'sarangabhavani1231@gmail.com', 87 | ''' 88 | class Button4 extends StatefulWidget { 89 | const Button4({super.key}); 90 | 91 | @override 92 | State createState() => _Button4State(); 93 | } 94 | 95 | class _Button4State extends State { 96 | bool _isLoading = false; 97 | @override 98 | Widget build(BuildContext context) { 99 | return ElevatedButton( 100 | onPressed: () async { 101 | setState(() => _isLoading = true); 102 | await Future.delayed(const Duration(seconds: 3)); 103 | setState(() => _isLoading = false); 104 | }, 105 | style: ElevatedButton.styleFrom( 106 | backgroundColor: const Color.fromARGB(255, 0, 194, 203), 107 | fixedSize: const Size(200, 50), 108 | shape: 109 | RoundedRectangleBorder(borderRadius: BorderRadius.circular(50))), 110 | child: _isLoading 111 | // ignore: sized_box_for_whitespace 112 | ? Container( 113 | width: 200, 114 | height: 100, 115 | child: const Row( 116 | children: [ 117 | CircularProgressIndicator( 118 | color: Colors.white, 119 | ), 120 | SizedBox(width: 10), 121 | Text('Please wait...', 122 | style: TextStyle( 123 | fontSize: 15, 124 | // fontWeight: FontWeight.w600, 125 | color: Color.fromARGB(255, 255, 255, 255))) 126 | ], 127 | ), 128 | ) 129 | : const Text("Animated Button", 130 | style: TextStyle( 131 | fontSize: 15, 132 | // fontWeight: FontWeight.w600, 133 | color: Color.fromARGB(255, 255, 255, 255))), 134 | ); 135 | } 136 | } 137 | ''', 138 | 'Button', 139 | Button4(), 140 | 'AnimatedButton', 141 | ) 142 | ]; 143 | -------------------------------------------------------------------------------- /lib/widgets/WidList/shapes/shape_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluttersnips/shared/exports.dart'; 2 | 3 | List shapeListW = [ 4 | const CardModel( 5 | "avinashjindal7866@gmail.com", 6 | '''class SquareShape extends StatefulWidget { 7 | const SquareShape({super.key}); 8 | 9 | @override 10 | State createState() => _SquareShapeState(); 11 | } 12 | 13 | class _SquareShapeState extends State { 14 | @override 15 | Widget build(BuildContext context) { 16 | return 17 | SizedBox( 18 | width: 400, 19 | height: 400, 20 | child: CustomPaint( 21 | painter: OpenPainter(rectColor: Color(0xffffffff), rectSize: Size(200, 250)), 22 | ), 23 | 24 | ); 25 | } 26 | } 27 | 28 | class OpenPainter extends CustomPainter { 29 | Color rectColor; 30 | Size rectSize; 31 | 32 | OpenPainter({required this.rectColor, required this.rectSize}); 33 | 34 | // ignore: empty_constructor_bodies 35 | @override 36 | void paint(Canvas canvas, Size size) { 37 | var paint1 = Paint() 38 | ..color = rectColor 39 | ..style = PaintingStyle.fill; 40 | canvas.drawRect(Offset(100, 100) & rectSize, paint1); 41 | } 42 | 43 | @override 44 | bool shouldRepaint(CustomPainter oldDelegate) => true; 45 | } 46 | ''', 47 | "Shapes", 48 | SquareShape(), 49 | "Square Shape using Canvas"), 50 | const CardModel( 51 | "avinashjindal7866@gmail.com", 52 | '''class TriangleShape extends StatelessWidget { 53 | @override 54 | Widget build(BuildContext context) { 55 | return Center( 56 | child: SizedBox( 57 | width: 200, 58 | height: 200, 59 | child: CustomPaint(size: const Size(200, 200), painter: DrawTriangle()), 60 | ), 61 | ); 62 | } 63 | } 64 | 65 | class DrawTriangle extends CustomPainter { 66 | @override 67 | void paint(Canvas canvas, Size size) { 68 | var path = Path(); 69 | path.moveTo(size.width / 2, 0); 70 | path.lineTo(0, size.height); 71 | path.lineTo(size.height, size.width); 72 | path.close(); 73 | canvas.drawPath(path, Paint()..color = Colors.green); 74 | } 75 | 76 | @override 77 | bool shouldRepaint(CustomPainter oldDelegate) { 78 | return false; 79 | } 80 | } 81 | 82 | ''', 83 | "Shapes", 84 | TriangleShape(), 85 | "Triangle Shape using Canvas"), 86 | const CardModel( 87 | "avinashjindal7866@gmail.com", 88 | '''class PentagonShape extends StatelessWidget { 89 | @override 90 | Widget build(BuildContext context) { 91 | return Center( 92 | child: ClipPath( 93 | clipper: DrawPentagon(), 94 | child: Container( 95 | color: Colors.red, 96 | width: 300, 97 | height: 300, 98 | ), 99 | ), 100 | ); 101 | } 102 | } 103 | 104 | class DrawPentagon extends CustomClipper { 105 | @override 106 | Path getClip(Size size) { 107 | Path path = Path(); 108 | path.addPolygon([ 109 | Offset(0, size.height * 1 / 3), 110 | Offset(size.width / 2, 0), 111 | Offset(size.width, size.height * 1 / 3), 112 | Offset(size.width * 4 / 5, size.height), 113 | Offset(size.width * 1 / 5, size.height), 114 | ], true); 115 | return path; 116 | } 117 | 118 | @override 119 | bool shouldReclip(covariant CustomClipper oldClipper) { 120 | return false; 121 | } 122 | } 123 | 124 | ''', 125 | "Shapes", 126 | PentagonShape(), 127 | "Pentagon Shape using Canvas"), 128 | const CardModel( 129 | "avinashjindal7866@gmail.com", 130 | '''class HexagonShape extends StatelessWidget { 131 | 132 | 133 | @override 134 | Widget build(BuildContext context) { 135 | return Center( 136 | child: ClipPath( 137 | clipper: DrawHexagon(), 138 | child: Container( 139 | color: Colors.blue, 140 | width: 300, 141 | height: 300, 142 | ), 143 | ), 144 | ); 145 | } 146 | } 147 | 148 | class DrawHexagon extends CustomClipper { 149 | @override 150 | Path getClip(Size size) { 151 | Path path = Path(); 152 | path.addPolygon([Offset(0, size.height / 2), Offset(size.width * 1 / 3, size.height), Offset(size.width * 2 / 3, size.height), Offset(size.width, size.height / 2), Offset(size.width * 2 / 3, 0), Offset(size.width * 1 / 3, 0)], true); 153 | return path; 154 | } 155 | 156 | @override 157 | bool shouldReclip(covariant CustomClipper oldClipper) { 158 | return false; 159 | } 160 | } 161 | 162 | ''', 163 | "Shapes", 164 | HexagonShape(), 165 | "Hexagon Shape using Canvas"), 166 | ]; 167 | -------------------------------------------------------------------------------- /lib/widgets/wild_list/carousels/carousel_wild_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:carousel_slider/carousel_slider.dart'; 3 | import 'package:smooth_page_indicator/smooth_page_indicator.dart'; 4 | //Run this command on terminal - flutter pub add carousel_slider 5 | //Run this command on terminal - flutter pub add smooth_page_indicator 6 | 7 | class Carousel1 extends StatefulWidget { 8 | const Carousel1({super.key}); 9 | 10 | @override 11 | State createState() => _Carousel1State(); 12 | } 13 | 14 | class _Carousel1State extends State { 15 | int activeIndex = 0; 16 | final images = [ 17 | "assets/images/boat.jpg", 18 | "assets/images/sea.jpg", 19 | "assets/images/tree.jpg" 20 | ]; 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return Stack( 25 | children: [ 26 | CarouselSlider.builder( 27 | itemCount: images.length, 28 | itemBuilder: (context, index, realIndex) { 29 | return Container( 30 | margin: const EdgeInsets.symmetric(horizontal: 8), 31 | decoration: BoxDecoration( 32 | borderRadius: BorderRadius.circular(12), 33 | image: DecorationImage( 34 | image: AssetImage(images[index]), 35 | fit: BoxFit.fill, 36 | ), 37 | ), 38 | ); 39 | }, 40 | options: CarouselOptions( 41 | height: 400, 42 | enlargeCenterPage: true, 43 | viewportFraction: 0.6, 44 | enableInfiniteScroll: true, 45 | reverse: false, 46 | autoPlay: true, 47 | autoPlayInterval: const Duration(seconds: 3), 48 | autoPlayAnimationDuration: const Duration(milliseconds: 800), 49 | autoPlayCurve: Curves.fastOutSlowIn, 50 | enlargeFactor: 0.3, 51 | scrollDirection: Axis.horizontal, 52 | onPageChanged: (index, reason) { 53 | setState(() { 54 | activeIndex = index; 55 | }); 56 | }), 57 | ), 58 | Positioned( 59 | left: 250, 60 | bottom: 10, 61 | child: AnimatedSmoothIndicator( 62 | activeIndex: activeIndex, 63 | count: images.length, 64 | effect: const WormEffect( 65 | dotWidth: 7, 66 | dotHeight: 7, 67 | activeDotColor: Colors.blue, 68 | dotColor: Colors.grey, 69 | ), 70 | ), 71 | ), 72 | ], 73 | ); 74 | } 75 | } 76 | 77 | class Datamodel { 78 | final String title; 79 | final String image; 80 | 81 | Datamodel(this.title, this.image); 82 | } 83 | 84 | List dataList = [ 85 | Datamodel("Serene Forest", "assets/images/forest.jpg"), 86 | Datamodel("A Floral Symphony", "assets/images/pink.jpg"), 87 | Datamodel("Graceful Butterflies", "assets/images/butterflies.jpg") 88 | ]; 89 | 90 | class Carousel2 extends StatefulWidget { 91 | const Carousel2({super.key}); 92 | 93 | @override 94 | State createState() => _Carousel2State(); 95 | } 96 | 97 | class _Carousel2State extends State { 98 | int activeIndex = 0; 99 | @override 100 | Widget build(BuildContext context) { 101 | return CarouselSlider.builder( 102 | itemCount: dataList.length, 103 | itemBuilder: (context, index, realIndex) { 104 | return Stack( 105 | children: [ 106 | Image.asset( 107 | dataList[index].image, 108 | fit: BoxFit.cover, 109 | ), 110 | Positioned( 111 | bottom: 20, 112 | left: 10, 113 | child: Text( 114 | dataList[index].title, 115 | style: const TextStyle( 116 | color: Color.fromARGB(255, 32, 241, 220), 117 | fontSize: 20, 118 | fontWeight: FontWeight.w900), 119 | ), 120 | ), 121 | Positioned( 122 | left: 200, 123 | bottom: 10, 124 | child: AnimatedSmoothIndicator( 125 | activeIndex: activeIndex, 126 | count: dataList.length, 127 | effect: const WormEffect( 128 | dotWidth: 7, 129 | dotHeight: 7, 130 | activeDotColor: Color.fromARGB(255, 9, 9, 9), 131 | dotColor: Colors.grey, 132 | ), 133 | ), 134 | ), 135 | ], 136 | ); 137 | }, 138 | options: CarouselOptions( 139 | //height: 300, 140 | viewportFraction: 1, 141 | enableInfiniteScroll: true, 142 | reverse: false, 143 | scrollDirection: Axis.horizontal, 144 | onPageChanged: (index, reason) { 145 | setState(() { 146 | activeIndex = index; 147 | }); 148 | }, 149 | ), 150 | ); 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /lib/router.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttersnips/screens/carousel.dart'; 3 | import 'package:fluttersnips/screens/columns.dart'; 4 | import 'package:fluttersnips/screens/intro_page.dart'; 5 | import 'package:fluttersnips/screens/layouts.dart'; 6 | import 'package:fluttersnips/screens/showCase/presentation/showCase.dart'; 7 | import 'package:fluttersnips/shared/exports.dart'; 8 | 9 | final _rootNavigatorKey = GlobalKey(); 10 | final _shellNavigatorKey = GlobalKey(); 11 | 12 | class Routes { 13 | static const String recentlyAdded = 'recently-added'; 14 | static const String cards = 'cards'; 15 | static const String shapes = 'shapes'; 16 | static const String navigation = 'navigation'; 17 | static const String webview = 'webview'; 18 | static const String columns = 'column'; 19 | static const String buttons = 'buttons'; 20 | static const String layout = 'layout'; 21 | static const String carousel = 'carousel'; 22 | } 23 | 24 | final router = GoRouter( 25 | initialLocation: '/', 26 | navigatorKey: _rootNavigatorKey, 27 | routes: [ 28 | ShellRoute( 29 | navigatorKey: _shellNavigatorKey, 30 | builder: (context, state, child) { 31 | return Showcase(child: child); 32 | }, 33 | routes: [ 34 | GoRoute( 35 | path: '/', 36 | pageBuilder: (context, state) { 37 | return const NoTransitionPage(child: IntroPage()); 38 | }, 39 | ), 40 | GoRoute( 41 | path: '/${Routes.recentlyAdded}', 42 | name: Routes.recentlyAdded, 43 | parentNavigatorKey: _shellNavigatorKey, 44 | pageBuilder: (context, state) { 45 | sideBarProvider.setCurrentTab(0); 46 | Utils.updateSearchIndex(0); 47 | return const NoTransitionPage(child: RecentlyAdded()); 48 | }, 49 | ), 50 | GoRoute( 51 | path: '/${Routes.cards}', 52 | name: Routes.cards, 53 | parentNavigatorKey: _shellNavigatorKey, 54 | pageBuilder: (context, state) { 55 | sideBarProvider.setCurrentTab(1); 56 | Utils.updateSearchIndex(1); 57 | return const NoTransitionPage(child: Cards()); 58 | }, 59 | ), 60 | GoRoute( 61 | path: '/${Routes.shapes}', 62 | name: Routes.shapes, 63 | parentNavigatorKey: _shellNavigatorKey, 64 | pageBuilder: (context, state) { 65 | sideBarProvider.setCurrentTab(2); 66 | Utils.updateSearchIndex(2); 67 | return const NoTransitionPage(child: Shapes()); 68 | }, 69 | ), 70 | GoRoute( 71 | path: '/${Routes.navigation}', 72 | name: Routes.navigation, 73 | parentNavigatorKey: _shellNavigatorKey, 74 | pageBuilder: (context, state) { 75 | sideBarProvider.setCurrentTab(3); 76 | Utils.updateSearchIndex(3); 77 | return NoTransitionPage(child: Navigation()); 78 | }, 79 | ), 80 | GoRoute( 81 | path: '/${Routes.webview}', 82 | name: Routes.webview, 83 | parentNavigatorKey: _shellNavigatorKey, 84 | pageBuilder: (context, state) { 85 | sideBarProvider.setCurrentTab(4); 86 | Utils.updateSearchIndex(4); 87 | return const NoTransitionPage(child: WebView()); 88 | }, 89 | ), 90 | GoRoute( 91 | path: '/${Routes.columns}', 92 | name: Routes.columns, 93 | parentNavigatorKey: _shellNavigatorKey, 94 | pageBuilder: (context, state) { 95 | sideBarProvider.setCurrentTab(5); 96 | Utils.updateSearchIndex(5); 97 | return const NoTransitionPage(child: Columns()); 98 | }, 99 | ), 100 | GoRoute( 101 | path: '/${Routes.buttons}', 102 | name: Routes.buttons, 103 | parentNavigatorKey: _shellNavigatorKey, 104 | pageBuilder: (context, state) { 105 | sideBarProvider.setCurrentTab(6); 106 | Utils.updateSearchIndex(6); 107 | return const NoTransitionPage(child: Buttons()); 108 | }, 109 | ), 110 | GoRoute( 111 | path: '/${Routes.layout}', 112 | name: Routes.layout, 113 | parentNavigatorKey: _shellNavigatorKey, 114 | pageBuilder: (context, state) { 115 | sideBarProvider.setCurrentTab(7); 116 | Utils.updateSearchIndex(7); 117 | return const NoTransitionPage(child: Layouts()); 118 | }, 119 | ), 120 | GoRoute( 121 | path: '/${Routes.carousel}', 122 | name: Routes.carousel, 123 | parentNavigatorKey: _shellNavigatorKey, 124 | pageBuilder: (context, state) { 125 | sideBarProvider.setCurrentTab(8); 126 | Utils.updateSearchIndex(8); 127 | return const NoTransitionPage(child: Carousel()); 128 | }, 129 | ), 130 | ], 131 | ), 132 | ], 133 | ); 134 | -------------------------------------------------------------------------------- /lib/widgets/wild_list/carousels/carousel_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluttersnips/models/card_model.dart'; 2 | import 'package:fluttersnips/widgets/wild_list/carousels/carousel_wild_list.dart'; 3 | 4 | const List carouselListW = [ 5 | CardModel( 6 | 'sarangabhavani1231@gmail.com', 7 | '''import 'package:carousel_slider/carousel_slider.dart'; 8 | import 'package:smooth_page_indicator/smooth_page_indicator.dart'; 9 | //Run this command on terminal - flutter pub add carousel_slider 10 | //Run this command on terminal - flutter pub add smooth_page_indicator 11 | 12 | class Carousel1 extends StatefulWidget { 13 | const Carousel1({super.key}); 14 | 15 | @override 16 | State createState() => _Carousel1State(); 17 | } 18 | 19 | class _Carousel1State extends State { 20 | int activeIndex = 0; 21 | final images = [ 22 | "assets/images/boat.jpg", 23 | "assets/images/sea.jpg", 24 | "assets/images/tree.jpg" 25 | ]; 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return Stack( 30 | children: [ 31 | CarouselSlider.builder( 32 | itemCount: images.length, 33 | itemBuilder: (context, index, realIndex) { 34 | return Container( 35 | margin: const EdgeInsets.symmetric(horizontal: 8), 36 | decoration: BoxDecoration( 37 | borderRadius: BorderRadius.circular(12), 38 | image: DecorationImage( 39 | image: AssetImage(images[index]), 40 | fit: BoxFit.fill, 41 | ), 42 | ), 43 | ); 44 | }, 45 | options: CarouselOptions( 46 | height: 400, 47 | enlargeCenterPage: true, 48 | viewportFraction: 0.6, 49 | enableInfiniteScroll: true, 50 | reverse: false, 51 | autoPlay: true, 52 | autoPlayInterval: const Duration(seconds: 3), 53 | autoPlayAnimationDuration: const Duration(milliseconds: 800), 54 | autoPlayCurve: Curves.fastOutSlowIn, 55 | enlargeFactor: 0.3, 56 | scrollDirection: Axis.horizontal, 57 | onPageChanged: (index, reason) { 58 | setState(() { 59 | activeIndex = index; 60 | }); 61 | }), 62 | ), 63 | Positioned( 64 | left: 250, 65 | bottom: 10, 66 | child: AnimatedSmoothIndicator( 67 | activeIndex: activeIndex, 68 | count: images.length, 69 | effect: const WormEffect( 70 | dotWidth: 7, 71 | dotHeight: 7, 72 | activeDotColor: Colors.blue, 73 | dotColor: Colors.grey, 74 | ), 75 | ), 76 | ), 77 | ], 78 | ); 79 | } 80 | } 81 | ''', 82 | 'carousel', 83 | Carousel1(), 84 | 'Carousel1', 85 | ), 86 | CardModel( 87 | 'sarangabhavani1231@gmail.com', 88 | ''' 89 | import 'package:carousel_slider/carousel_slider.dart'; 90 | import 'package:smooth_page_indicator/smooth_page_indicator.dart'; 91 | //Run this command on terminal - flutter pub add carousel_slider 92 | //Run this command on terminal - flutter pub add smooth_page_indicator 93 | 94 | 95 | List dataList = [ 96 | Datamodel("Serene Forest", "assets/images/forest.jpg"), 97 | Datamodel("A Floral Symphony", "assets/images/pink.jpg"), 98 | Datamodel("Graceful Butterflies", "assets/images/butterflies.jpg") 99 | ]; 100 | 101 | class Carousel2 extends StatefulWidget { 102 | const Carousel2({super.key}); 103 | 104 | @override 105 | State createState() => _Carousel2State(); 106 | } 107 | 108 | class _Carousel2State extends State { 109 | int activeIndex = 0; 110 | @override 111 | Widget build(BuildContext context) { 112 | return CarouselSlider.builder( 113 | itemCount: dataList.length, 114 | itemBuilder: (context, index, realIndex) { 115 | return Stack( 116 | children: [ 117 | Image.asset( 118 | dataList[index].image, 119 | fit: BoxFit.cover, 120 | ), 121 | Positioned( 122 | bottom: 20, 123 | left: 10, 124 | child: Text( 125 | dataList[index].title, 126 | style: const TextStyle( 127 | color: Color.fromARGB(255, 32, 241, 220), 128 | fontSize: 20, 129 | fontWeight: FontWeight.w900), 130 | ), 131 | ), 132 | Positioned( 133 | left: 200, 134 | bottom: 10, 135 | child: AnimatedSmoothIndicator( 136 | activeIndex: activeIndex, 137 | count: dataList.length, 138 | effect: const WormEffect( 139 | dotWidth: 7, 140 | dotHeight: 7, 141 | activeDotColor: Color.fromARGB(255, 9, 9, 9), 142 | dotColor: Colors.grey, 143 | ), 144 | ), 145 | ), 146 | ], 147 | ); 148 | }, 149 | options: CarouselOptions( 150 | 151 | viewportFraction: 1, 152 | enableInfiniteScroll: true, 153 | reverse: false, 154 | scrollDirection: Axis.horizontal, 155 | onPageChanged: (index, reason) { 156 | setState(() { 157 | activeIndex = index; 158 | }); 159 | }, 160 | ), 161 | ); 162 | } 163 | } 164 | 165 | ''', 166 | 'carousel', 167 | Carousel2(), 168 | 'Carousel2', 169 | ) 170 | ]; 171 | -------------------------------------------------------------------------------- /linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.10) 3 | project(runner LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "fluttersnips") 8 | # The unique GTK application identifier for this application. See: 9 | # https://wiki.gnome.org/HowDoI/ChooseApplicationID 10 | set(APPLICATION_ID "com.example.fluttersnips") 11 | 12 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 13 | # versions of CMake. 14 | cmake_policy(SET CMP0063 NEW) 15 | 16 | # Load bundled libraries from the lib/ directory relative to the binary. 17 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 18 | 19 | # Root filesystem for cross-building. 20 | if(FLUTTER_TARGET_PLATFORM_SYSROOT) 21 | set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) 22 | set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) 23 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 24 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 25 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 26 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 27 | endif() 28 | 29 | # Define build configuration options. 30 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 31 | set(CMAKE_BUILD_TYPE "Debug" CACHE 32 | STRING "Flutter build mode" FORCE) 33 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 34 | "Debug" "Profile" "Release") 35 | endif() 36 | 37 | # Compilation settings that should be applied to most targets. 38 | # 39 | # Be cautious about adding new options here, as plugins use this function by 40 | # default. In most cases, you should add new options to specific targets instead 41 | # of modifying this function. 42 | function(APPLY_STANDARD_SETTINGS TARGET) 43 | target_compile_features(${TARGET} PUBLIC cxx_std_14) 44 | target_compile_options(${TARGET} PRIVATE -Wall -Werror) 45 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") 46 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") 47 | endfunction() 48 | 49 | # Flutter library and tool build rules. 50 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 51 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 52 | 53 | # System-level dependencies. 54 | find_package(PkgConfig REQUIRED) 55 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 56 | 57 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") 58 | 59 | # Define the application target. To change its name, change BINARY_NAME above, 60 | # not the value here, or `flutter run` will no longer work. 61 | # 62 | # Any new source files that you add to the application should be added here. 63 | add_executable(${BINARY_NAME} 64 | "main.cc" 65 | "my_application.cc" 66 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 67 | ) 68 | 69 | # Apply the standard set of build settings. This can be removed for applications 70 | # that need different build settings. 71 | apply_standard_settings(${BINARY_NAME}) 72 | 73 | # Add dependency libraries. Add any application-specific dependencies here. 74 | target_link_libraries(${BINARY_NAME} PRIVATE flutter) 75 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) 76 | 77 | # Run the Flutter tool portions of the build. This must not be removed. 78 | add_dependencies(${BINARY_NAME} flutter_assemble) 79 | 80 | # Only the install-generated bundle's copy of the executable will launch 81 | # correctly, since the resources must in the right relative locations. To avoid 82 | # people trying to run the unbundled copy, put it in a subdirectory instead of 83 | # the default top-level location. 84 | set_target_properties(${BINARY_NAME} 85 | PROPERTIES 86 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" 87 | ) 88 | 89 | 90 | # Generated plugin build rules, which manage building the plugins and adding 91 | # them to the application. 92 | include(flutter/generated_plugins.cmake) 93 | 94 | 95 | # === Installation === 96 | # By default, "installing" just makes a relocatable bundle in the build 97 | # directory. 98 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") 99 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 100 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 101 | endif() 102 | 103 | # Start with a clean build bundle directory every time. 104 | install(CODE " 105 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") 106 | " COMPONENT Runtime) 107 | 108 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 109 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") 110 | 111 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 112 | COMPONENT Runtime) 113 | 114 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 115 | COMPONENT Runtime) 116 | 117 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 118 | COMPONENT Runtime) 119 | 120 | foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) 121 | install(FILES "${bundled_library}" 122 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 123 | COMPONENT Runtime) 124 | endforeach(bundled_library) 125 | 126 | # Fully re-copy the assets directory on each build to avoid having stale files 127 | # from a previous install. 128 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 129 | install(CODE " 130 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 131 | " COMPONENT Runtime) 132 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 133 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 134 | 135 | # Install the AOT library on non-Debug builds only. 136 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") 137 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 138 | COMPONENT Runtime) 139 | endif() 140 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## FlutterSnips.♥ 2 | 3 | ## HACKTOBERFEST ♥♥ This year we are opening this repo for hacktoberfest contributions. 4 | Have fun contributing . Please read the Conrtibuting.md file. 5 | ![hf10_banner_sponsors_1032x600](https://github.com/dhruvpatidar359/Fluttersnips/assets/103873587/33024939-f469-4c22-86f7-acba4d5bc697) 6 | 7 | 8 | ## AIM : 9 | This platform is created , so as to make a huge library of already builded code , that developers can directly use in their flutter project. 10 | - It will decrease the time to build the projects 11 | 12 | - Extensive Code Library: Access a vast collection of pre-built code snippets covering a wide range of Flutter development scenarios and use cases. 13 | 14 | - Save Development Time: Speed up your development process by leveraging ready-to-use code solutions instead of building everything from scratch. 15 | 16 | - Easy Integration: Seamlessly integrate the code snippets into your Flutter projects with clear instructions and guidelines provided. 17 | 18 | - Search and Discover: Find the right code snippet quickly using powerful search functionality. Search by keywords, categories, or tags to locate relevant code for your specific needs. 19 | 20 | - High-Quality Code: Rest assured that all code snippets have undergone thorough testing and review processes to ensure reliability, efficiency, and adherence to best practices. 21 | 22 | - Open-Source: The platform is open-source, allowing developers to collaborate, contribute, and improve the code snippets for the benefit of the entire community. 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ![FlutterSnips](https://github.com/dhruvpatidar359/Fluttersnips/assets/103873587/64ef0bdd-4a28-4d67-9b63-53f0bad5c58c) 32 | 33 | 34 | ## [LIVE LINK](https://fluttersnips.vercel.app/) 35 | 36 | ![image](https://github.com/dhruvpatidar359/Fluttersnips/assets/103873587/7142a96f-c654-4836-a726-42665e81457c) 37 | 38 | 39 | ## 🛠️ Installation Steps + CONTRIBUTION 40 | 41 | 42 | 1. Open Terminal and Clone the Repo 43 | 44 | ```bash 45 | git clone https://github.com/dhruvpatidar359/Fluttersnips.git 46 | ``` 47 | 2. Cd Over 48 | 49 | ```bash 50 | cd fluttersnips 51 | ``` 52 | 3. Run Pub 53 | ``` 54 | Flutter pub get 55 | ``` 56 | 4. Creating .env file in root directory 57 | set up your firebase for the flutter web app 58 | ``` 59 | GOOGLE_SIGNIN_CLIENT_ID= 60 | ``` 61 | ![FlutterSnips (1)](https://github.com/dhruvpatidar359/Fluttersnips/assets/103873587/f18f1e14-2e55-4cbf-a795-6a646203ba57) 62 | 63 | 64 | 65 | For getting this you have to connect this app with your firebase flutter webapp : 66 | 1.1) Run the following commands or visit(https://firebase.google.com/docs/flutter/setup?platform=web) 67 | ``` 68 | firebase login 69 | ``` 70 | 71 | ``` 72 | dart pub global activate flutterfire_cli 73 | ``` 74 | 75 | ``` 76 | flutterfire configure 77 | ``` 78 | 79 | Create a project for your firebase 80 | 81 | 1.2) Enable firebase authentication there ( With google authentication ) 82 | - There get the web - client - id copy it . 83 | 84 | ![rKMtK](https://github.com/dhruvpatidar359/Fluttersnips/assets/103873587/d4f8574b-41d5-4748-bd44-d71ff505645d) 85 | 86 | 87 | - paste , it in the .env file 88 | ``` 89 | GOOGLE_SIGNIN_CLIENT_ID=YOUR_CLIENT_ID 90 | 91 | ``` 92 | 1.3 ) Enable firebase firestore 93 | 1.4 ) Create two collections there as - recents and users 94 | 95 | ![image](https://github.com/dhruvpatidar359/Fluttersnips/assets/103873587/1c90ee2c-a7d2-4d2f-9d80-6c394f37217c) 96 | 97 | 98 | 99 | 100 | 101 | 1.5 ) If you want to enable google login in the webapp , then you have to enable your PEOPLE API from GCP(Google Cloud Platform) . 102 | 103 | ![image](https://github.com/dhruvpatidar359/Fluttersnips/assets/103873587/4aadb703-1dab-4bea-928d-c5fea5267c55) 104 | 105 | Steps : 1 ) Login to Google Cloud platform 106 | 2 ) Select your project 107 | 3 ) Go to API and Services 108 | 4 ) Search for People API 109 | 5 ) Enable It 110 | 111 | 112 | 5. Run App 113 | ``` 114 | flutter run 115 | ``` 116 | 117 |
118 | 119 |

120 | 121 | 127 | 128 | 129 | 130 |

131 | 132 |
133 | 134 | 135 | 136 | ## For Widget Code Contribution 137 | 138 | ![FlutterSnips (2)](https://github.com/dhruvpatidar359/Fluttersnips/assets/103873587/a9b1566b-86d4-4cc8-b10a-71ce079c420f) 139 | 140 | 141 | ## Project Maintainers ❤️ 142 | 143 | 144 |

145 | 146 | 147 |

148 |      149 |      150 |

151 | 152 | ## Contributors 💘 153 | 154 | 155 | 156 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /lib/screens/intro_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttersnips/shared/exports.dart'; 3 | 4 | class IntroPage extends StatelessWidget { 5 | const IntroPage({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return SingleChildScrollView( 10 | child: Column( 11 | children: [ 12 | Padding( 13 | padding: const EdgeInsets.fromLTRB(40, 110, 40, 30), 14 | child: Row( 15 | children: [ 16 | SizedBox( 17 | height: 200, 18 | width: 400, 19 | child: Column( 20 | crossAxisAlignment: CrossAxisAlignment.start, 21 | children: [ 22 | Flexible( 23 | child: Text( 24 | 'A comprehensive component library for Flutter.', 25 | style: GoogleFonts.poppins( 26 | color: Colors.white, 27 | fontSize: 16, 28 | fontWeight: FontWeight.w500, 29 | ), 30 | ), 31 | ), 32 | Flexible( 33 | child: Text( 34 | 'Flutter Snips.', 35 | style: GoogleFonts.alfaSlabOne( 36 | color: Colors.white, 37 | fontSize: 48, 38 | fontWeight: FontWeight.w400, 39 | ), 40 | ), 41 | ), 42 | Flexible( 43 | child: Text( 44 | 'By Community For Community', 45 | style: GoogleFonts.poppins( 46 | color: Colors.white, 47 | fontSize: 16, 48 | fontWeight: FontWeight.w500, 49 | ), 50 | ), 51 | ), 52 | ], 53 | ), 54 | ), 55 | const SizedBox( 56 | height: 400, 57 | width: 400, 58 | child: RiveAnimation.asset("assets/birb.riv"), 59 | ), 60 | ], 61 | ), 62 | ), 63 | const SizedBox(height: 30), 64 | Padding( 65 | padding: const EdgeInsets.all(8.0), 66 | child: Row( 67 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 68 | children: [ 69 | SizedBox( 70 | width: 300, 71 | height: 400, 72 | child: GlassyCard( 73 | child: Center( 74 | child: Column( 75 | mainAxisAlignment: MainAxisAlignment.center, 76 | children: [ 77 | Text( 78 | "How To Use", 79 | style: GoogleFonts.poppins( 80 | fontSize: 25, 81 | fontWeight: FontWeight.w900, 82 | ), 83 | ), 84 | Text( 85 | "👉 Click on SideBar buttons", 86 | style: GoogleFonts.poppins( 87 | fontSize: 15, 88 | fontWeight: FontWeight.w400, 89 | ), 90 | ), 91 | Text( 92 | "👉 Look for your choice", 93 | style: GoogleFonts.poppins( 94 | fontSize: 15, 95 | fontWeight: FontWeight.w400, 96 | ), 97 | ), 98 | Text( 99 | "👉 Copy Code", 100 | style: GoogleFonts.poppins( 101 | fontSize: 15, 102 | fontWeight: FontWeight.w400, 103 | ), 104 | ), 105 | Text( 106 | "👉 Enjoy", 107 | style: GoogleFonts.poppins( 108 | fontSize: 15, 109 | fontWeight: FontWeight.w400, 110 | ), 111 | ), 112 | ], 113 | ))), 114 | ), 115 | SizedBox( 116 | width: 300, 117 | height: 400, 118 | child: GlassyCard( 119 | child: Center( 120 | child: Column( 121 | mainAxisAlignment: MainAxisAlignment.center, 122 | children: [ 123 | Text( 124 | "How To Contribute", 125 | style: GoogleFonts.poppins( 126 | fontSize: 25, 127 | fontWeight: FontWeight.w900, 128 | ), 129 | ), 130 | Text( 131 | "👉 Click on Contribute Button", 132 | style: GoogleFonts.poppins( 133 | fontSize: 15, 134 | fontWeight: FontWeight.w400, 135 | ), 136 | ), 137 | Text( 138 | "👉 Select Way to Contribute", 139 | style: GoogleFonts.poppins( 140 | fontSize: 15, 141 | fontWeight: FontWeight.w400, 142 | ), 143 | ), 144 | Text( 145 | "👉 Fluttersnips ,Add Code", 146 | style: GoogleFonts.poppins( 147 | fontSize: 15, 148 | fontWeight: FontWeight.w400, 149 | ), 150 | ), 151 | Text( 152 | "👉 OR Go For Github", 153 | style: GoogleFonts.poppins( 154 | fontSize: 15, 155 | fontWeight: FontWeight.w400, 156 | ), 157 | ), 158 | ], 159 | ))), 160 | ), 161 | ], 162 | ), 163 | ) 164 | ], 165 | ), 166 | ); 167 | } 168 | } 169 | -------------------------------------------------------------------------------- /lib/widgets/nav_bar/presentation/custom_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_snackbar_content/awesome_snackbar_content.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:fluttersnips/services/auth/auth_repository.dart'; 4 | import 'package:fluttersnips/services/datafetch/firebase_repository.dart'; 5 | 6 | import '../../../constants/app_colors.dart'; 7 | 8 | class MyCustomDialog extends StatefulWidget { 9 | const MyCustomDialog({Key? key}) : super(key: key); 10 | 11 | @override 12 | State createState() => _MyCustomDialogState(); 13 | } 14 | 15 | class _MyCustomDialogState extends State { 16 | final TextEditingController _emailController = TextEditingController(); 17 | final TextEditingController _widNameController = TextEditingController(); 18 | final TextEditingController _codeController = TextEditingController(); 19 | String _selectedClass = 'Card'; 20 | final List _classOptions = [ 21 | 'Container', 22 | 'Row', 23 | 'Column', 24 | 'Text', 25 | 'TextField', 26 | 'Button', 27 | 'TextButton', 28 | 'ElevatedButton', 29 | 'IconButton', 30 | 'AppBar', 31 | 'Image', 32 | 'ListView', 33 | 'GridView', 34 | 'Card', 35 | 'ExpansionPanel', 36 | 'AlertDialog', 37 | 'BottomSheet', 38 | 'Drawer', 39 | 'SnackBar', 40 | 'CircularProgressIndicator', 41 | 'LinearProgressIndicator', 42 | 'Checkbox', 43 | 'Radio', 44 | 'Switch', 45 | 'DropdownButton', 46 | 'Slider', 47 | 'DatePicker', 48 | 'TimePicker', 49 | 'Stack', 50 | 'Positioned', 51 | 'Align', 52 | 'Wrap', 53 | 'Spacer', 54 | 'InkWell', 55 | 'GestureDetector', 56 | 'Opacity', 57 | 'AnimatedContainer', 58 | 'Hero', 59 | 'ClipRRect', 60 | 'IndexedStack', 61 | 'PageView', 62 | 'Tooltip', 63 | 'RichText', 64 | 'DataTable', 65 | 'Stepper', 66 | 'TabBar', 67 | 'SnackBar', 68 | 'WebView', 69 | 'VideoPlayer', 70 | ]; 71 | bool _isFormValid = false; 72 | 73 | @override 74 | void dispose() { 75 | _emailController.dispose(); 76 | _codeController.dispose(); 77 | _widNameController.dispose(); 78 | super.dispose(); 79 | } 80 | 81 | @override 82 | Widget build(BuildContext context) { 83 | return AlertDialog( 84 | title: const Text('Add Details', style: TextStyle(color: primaryColor)), 85 | content: Column( 86 | mainAxisSize: MainAxisSize.min, 87 | children: [ 88 | TextField( 89 | controller: _widNameController, 90 | decoration: const InputDecoration( 91 | labelText: 'Widget Name', 92 | fillColor: primaryColor, 93 | ), 94 | onChanged: (_) => _validateForm(), 95 | ), 96 | const SizedBox(height: 16), 97 | TextField( 98 | controller: _emailController, 99 | decoration: const InputDecoration( 100 | labelText: 'Email', 101 | fillColor: primaryColor, 102 | ), 103 | onChanged: (_) => _validateForm(), 104 | ), 105 | const SizedBox(height: 16), 106 | SizedBox( 107 | height: 200, 108 | width: MediaQuery.of(context).size.width * (3 / 4), 109 | child: SingleChildScrollView( 110 | child: TextField( 111 | controller: _codeController, 112 | decoration: const InputDecoration( 113 | labelText: 'Code', 114 | fillColor: primaryColor, 115 | ), 116 | maxLines: null, 117 | onChanged: (_) => _validateForm(), 118 | ), 119 | ), 120 | ), 121 | const SizedBox(height: 16), 122 | DropdownButtonFormField( 123 | value: _selectedClass, 124 | items: _classOptions.map((String value) { 125 | return DropdownMenuItem( 126 | value: value, 127 | child: Text(value), 128 | ); 129 | }).toList(), 130 | onChanged: (String? newValue) { 131 | setState(() { 132 | _selectedClass = newValue!; 133 | _validateForm(); 134 | }); 135 | }, 136 | decoration: const InputDecoration( 137 | labelText: 'Class', 138 | fillColor: primaryColor, 139 | ), 140 | ), 141 | ], 142 | ), 143 | actions: [ 144 | TextButton( 145 | onPressed: () { 146 | Navigator.of(context).pop(); 147 | }, 148 | child: const Text('Cancel', style: TextStyle(color: primaryColor)), 149 | ), 150 | ElevatedButton( 151 | onPressed: _isFormValid ? _submitForm : null, 152 | child: const Text('Submit', style: TextStyle(color: primaryColor)), 153 | ), 154 | ], 155 | // Disable the dialog's close button 156 | // barrierDismissible: false, 157 | ); 158 | } 159 | 160 | void _validateForm() { 161 | setState(() { 162 | _isFormValid = _widNameController.text.isNotEmpty && 163 | _emailController.text.isNotEmpty && 164 | _codeController.text.isNotEmpty; 165 | }); 166 | } 167 | 168 | void _submitForm() async { 169 | final String email = _emailController.text; 170 | final String code = _codeController.text; 171 | final String classT = _selectedClass; 172 | final String widName = _widNameController.text; 173 | 174 | FirebaseRepository().saveCode(widName, email, code, classT); 175 | if (authRepositoryInstance.name != null) { 176 | await authRepositoryInstance 177 | .increaseContriCount(authRepositoryInstance.uid.toString()); 178 | } 179 | 180 | final snackBar = SnackBar( 181 | /// need to set following properties for best effect of awesome_snackbar_content 182 | elevation: 0, 183 | 184 | behavior: SnackBarBehavior.fixed, 185 | 186 | backgroundColor: Colors.transparent, 187 | content: AwesomeSnackbarContent( 188 | title: 'YAY,Contributed!', 189 | message: 'You code has been submitted!', 190 | messageFontSize: 15, 191 | titleFontSize: 20, 192 | color: Colors.green.shade700, 193 | 194 | /// change contentType to ContentType.success, ContentType.warning or ContentType.help for variants 195 | contentType: ContentType.success, 196 | ), 197 | ); 198 | 199 | if (mounted) { 200 | ScaffoldMessenger.of(context) 201 | ..hideCurrentSnackBar() 202 | ..showSnackBar(snackBar); 203 | 204 | Navigator.of(context).pop(); 205 | } 206 | } 207 | } 208 | -------------------------------------------------------------------------------- /lib/widgets/wild_list/shapes/shape_wild_list.dart: -------------------------------------------------------------------------------- 1 | // Square shape using canvas 2 | import 'dart:math' as math; 3 | import 'package:flutter/material.dart'; 4 | 5 | class SquareShape extends StatefulWidget { 6 | const SquareShape({super.key}); 7 | 8 | @override 9 | State createState() => _SquareShapeState(); 10 | } 11 | 12 | class _SquareShapeState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return SizedBox( 16 | width: 400, 17 | height: 400, 18 | child: CustomPaint( 19 | painter: OpenPainter( 20 | rectColor: Colors.yellow, rectSize: const Size(200, 250)), 21 | ), 22 | ); 23 | } 24 | } 25 | 26 | class OpenPainter extends CustomPainter { 27 | Color rectColor; 28 | Size rectSize; 29 | 30 | OpenPainter({required this.rectColor, required this.rectSize}); 31 | 32 | // ignore: empty_constructor_bodies 33 | @override 34 | void paint(Canvas canvas, Size size) { 35 | var paint1 = Paint() 36 | ..color = rectColor 37 | ..style = PaintingStyle.fill; 38 | canvas.drawRect(const Offset(100, 100) & rectSize, paint1); 39 | } 40 | 41 | @override 42 | bool shouldRepaint(CustomPainter oldDelegate) => true; 43 | } 44 | 45 | // triangle shape using canvas 46 | 47 | class TriangleShape extends StatelessWidget { 48 | const TriangleShape({super.key}); 49 | 50 | @override 51 | Widget build(BuildContext context) { 52 | return Center( 53 | child: SizedBox( 54 | width: 200, 55 | height: 200, 56 | child: CustomPaint(size: const Size(200, 200), painter: DrawTriangle()), 57 | ), 58 | ); 59 | } 60 | } 61 | 62 | class DrawTriangle extends CustomPainter { 63 | @override 64 | void paint(Canvas canvas, Size size) { 65 | var path = Path(); 66 | path.moveTo(size.width / 2, 0); 67 | path.lineTo(0, size.height); 68 | path.lineTo(size.height, size.width); 69 | path.close(); 70 | canvas.drawPath(path, Paint()..color = Colors.green); 71 | } 72 | 73 | @override 74 | bool shouldRepaint(CustomPainter oldDelegate) { 75 | return false; 76 | } 77 | } 78 | 79 | // Pentagon shape using Canvas 80 | 81 | class PentagonShape extends StatelessWidget { 82 | const PentagonShape({super.key}); 83 | 84 | @override 85 | Widget build(BuildContext context) { 86 | return Center( 87 | child: ClipPath( 88 | clipper: DrawPentagon(), 89 | child: Container( 90 | color: Colors.red, 91 | width: 300, 92 | height: 300, 93 | ), 94 | ), 95 | ); 96 | } 97 | } 98 | 99 | class DrawPentagon extends CustomClipper { 100 | @override 101 | Path getClip(Size size) { 102 | Path path = Path(); 103 | path.addPolygon([ 104 | Offset(0, size.height * 1 / 3), 105 | Offset(size.width / 2, 0), 106 | Offset(size.width, size.height * 1 / 3), 107 | Offset(size.width * 4 / 5, size.height), 108 | Offset(size.width * 1 / 5, size.height), 109 | ], true); 110 | return path; 111 | } 112 | 113 | @override 114 | bool shouldReclip(covariant CustomClipper oldClipper) { 115 | return false; 116 | } 117 | } 118 | 119 | // Hexagon shape using canvas 120 | 121 | class HexagonShape extends StatelessWidget { 122 | const HexagonShape({super.key}); 123 | 124 | @override 125 | Widget build(BuildContext context) { 126 | return Center( 127 | child: ClipPath( 128 | clipper: DrawHexagon(), 129 | child: Container( 130 | color: Colors.blue, 131 | width: 300, 132 | height: 300, 133 | ), 134 | ), 135 | ); 136 | } 137 | } 138 | 139 | class DrawHexagon extends CustomClipper { 140 | @override 141 | Path getClip(Size size) { 142 | Path path = Path(); 143 | path.addPolygon([ 144 | Offset(0, size.height / 2), 145 | Offset(size.width * 1 / 3, size.height), 146 | Offset(size.width * 2 / 3, size.height), 147 | Offset(size.width, size.height / 2), 148 | Offset(size.width * 2 / 3, 0), 149 | Offset(size.width * 1 / 3, 0) 150 | ], true); 151 | return path; 152 | } 153 | 154 | @override 155 | bool shouldReclip(covariant CustomClipper oldClipper) { 156 | return false; 157 | } 158 | } 159 | 160 | 161 | 162 | // Star shape using canvas 163 | 164 | class FourPointedStar extends StatelessWidget { 165 | const FourPointedStar({super.key}); 166 | 167 | @override 168 | Widget build(BuildContext context) { 169 | return Center( 170 | child: ClipPath( 171 | clipper: StarClipper(5), 172 | child: Container( 173 | width: 300, 174 | height: 300, 175 | color: Colors.green, 176 | ), 177 | ), 178 | ); 179 | } 180 | } 181 | 182 | // 6-point star shape using canvas 183 | 184 | class SixPointedStar extends StatelessWidget { 185 | const SixPointedStar({super.key}); 186 | 187 | @override 188 | Widget build(BuildContext context) { 189 | return Center( 190 | child: ClipPath( 191 | clipper: StarClipper(6), 192 | child: Container( 193 | width: 300, 194 | height: 300, 195 | color: Colors.white, 196 | ), 197 | ), 198 | ); 199 | } 200 | } 201 | 202 | // 10-point star shape using canvas 203 | 204 | class TenPointedStar extends StatelessWidget { 205 | const TenPointedStar({super.key}); 206 | 207 | @override 208 | Widget build(BuildContext context) { 209 | return Center( 210 | child: ClipPath( 211 | clipper: StarClipper(10), 212 | child: Container( 213 | width: 300, 214 | height: 300, 215 | color: Colors.red, 216 | ), 217 | ), 218 | ); 219 | } 220 | } 221 | 222 | // 20-point star shape using canvas 223 | 224 | class TwentyPointedStar extends StatelessWidget { 225 | const TwentyPointedStar({super.key}); 226 | 227 | @override 228 | Widget build(BuildContext context) { 229 | return Center( 230 | child: ClipPath( 231 | clipper: StarClipper(20), 232 | child: Container( 233 | width: 300, 234 | height: 300, 235 | color: Colors.blue, 236 | ), 237 | ), 238 | ); 239 | } 240 | } 241 | 242 | class StarClipper extends CustomClipper { 243 | /// The number of points of the star 244 | final int points; 245 | StarClipper(this.points); 246 | 247 | // Degrees to radians conversion 248 | double _degreeToRadian(double deg) => deg * (math.pi / 180.0); 249 | 250 | @override 251 | Path getClip(Size size) { 252 | Path path = Path(); 253 | double max = 2 * math.pi; 254 | 255 | double width = size.width; 256 | double halfWidth = width / 2; 257 | 258 | double wingRadius = halfWidth; 259 | double radius = halfWidth / 2; 260 | 261 | double degreesPerStep = _degreeToRadian(360 / points); 262 | double halfDegreesPerStep = degreesPerStep / 2; 263 | 264 | path.moveTo(width, halfWidth); 265 | 266 | for (double step = 0; step < max; step += degreesPerStep) { 267 | path.lineTo(halfWidth + wingRadius * math.cos(step), halfWidth + wingRadius * math.sin(step)); 268 | path.lineTo(halfWidth + radius * math.cos(step + halfDegreesPerStep), halfWidth + radius * math.sin(step + halfDegreesPerStep)); 269 | } 270 | 271 | path.close(); 272 | return path; 273 | } 274 | 275 | @override 276 | bool shouldReclip(CustomClipper oldClipper) { 277 | StarClipper starClipper = oldClipper as StarClipper; 278 | return points != starClipper.points; 279 | } 280 | } 281 | --------------------------------------------------------------------------------