├── .dart_tool
├── version
├── extension_discovery
│ ├── devtools.json
│ ├── vs_code.json
│ └── README.md
├── package_config_subset
└── package_config.json
├── LICENSE
├── CHANGELOG.md
├── lib
├── src
│ ├── models
│ │ └── dropdown_model.dart
│ ├── constants
│ │ └── dimensions.dart
│ ├── themes
│ │ └── custom_color.dart
│ ├── utils
│ │ ├── dropdown_utils.dart
│ │ ├── input_field_utils.dart
│ │ └── overlay_utils.dart
│ └── widgets
│ │ ├── dropdown_list.dart
│ │ └── dropdown_pro.dart
└── dropdown_pro.dart
├── example
├── android
│ ├── 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
│ │ │ │ │ │ └── example
│ │ │ │ │ │ └── MainActivity.kt
│ │ │ │ └── AndroidManifest.xml
│ │ │ ├── debug
│ │ │ │ └── AndroidManifest.xml
│ │ │ └── profile
│ │ │ │ └── AndroidManifest.xml
│ │ └── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ ├── .gitignore
│ ├── build.gradle
│ └── settings.gradle
├── pubspec.yaml
├── README.md
├── .gitignore
├── .metadata
├── test
│ └── widget_test.dart
├── analysis_options.yaml
├── lib
│ └── main.dart
└── pubspec.lock
├── analysis_options.yaml
├── .idea
├── modules.xml
├── libraries
│ └── Dart_SDK.xml
└── workspace.xml
├── .metadata
├── test
└── dropdown_pro_test.dart
├── dropdown_pro.iml
├── README.md
├── pubspec.yaml
└── pubspec.lock
/.dart_tool/version:
--------------------------------------------------------------------------------
1 | 3.24.0
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | TODO: Add your license here.
2 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.1
2 |
3 | * TODO: Describe initial release.
4 |
--------------------------------------------------------------------------------
/lib/src/models/dropdown_model.dart:
--------------------------------------------------------------------------------
1 | abstract class DropdownModel {
2 | String get title;
3 | }
4 |
--------------------------------------------------------------------------------
/.dart_tool/extension_discovery/devtools.json:
--------------------------------------------------------------------------------
1 | {"version":2,"entries":[{"package":"dropdown_pro","rootUri":"../","packageUri":"lib/"}]}
--------------------------------------------------------------------------------
/.dart_tool/extension_discovery/vs_code.json:
--------------------------------------------------------------------------------
1 | {"version":2,"entries":[{"package":"dropdown_pro","rootUri":"../","packageUri":"lib/"}]}
--------------------------------------------------------------------------------
/lib/dropdown_pro.dart:
--------------------------------------------------------------------------------
1 | library dropdown_pro;
2 |
3 | export 'src/models/dropdown_model.dart';
4 | export 'src/widgets/dropdown_pro.dart';
5 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rabbihossen/dropdown_pro/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rabbihossen/dropdown_pro/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rabbihossen/dropdown_pro/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rabbihossen/dropdown_pro/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rabbihossen/dropdown_pro/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:flutter_lints/flutter.yaml
2 |
3 | # Additional information about this file can be found at
4 | # https://dart.dev/guides/language/analysis-options
5 |
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity()
6 |
--------------------------------------------------------------------------------
/lib/src/constants/dimensions.dart:
--------------------------------------------------------------------------------
1 | class Dimensions {
2 | static const double inputBoxHeight = 48.0;
3 | static const double radius = 8.0;
4 | static const double buttonFontSize = 16.0;
5 | static const double paddingSize = 16.0;
6 | }
7 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
6 |
--------------------------------------------------------------------------------
/lib/src/themes/custom_color.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CustomColor {
4 | static const Color primary = Color(0xFF6200EE);
5 | static const Color whiteColor = Color(0xFFFFFFFF);
6 | static const Color blackColor = Color(0xFF000000);
7 | }
8 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/to/reference-keystore
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: "80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819"
8 | channel: "stable"
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/test/dropdown_pro_test.dart:
--------------------------------------------------------------------------------
1 | // import 'package:flutter_test/flutter_test.dart';
2 |
3 | // import 'package:dropdown_pro/dropdown_pro.dart';
4 |
5 | // void main() {
6 | // test('adds one to input values', () {
7 | // final calculator = Calculator();
8 | // expect(calculator.addOne(2), 3);
9 | // expect(calculator.addOne(-7), -6);
10 | // expect(calculator.addOne(0), 1);
11 | // });
12 | // }
13 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | allprojects {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | }
6 | }
7 |
8 | rootProject.buildDir = "../build"
9 | subprojects {
10 | project.buildDir = "${rootProject.buildDir}/${project.name}"
11 | }
12 | subprojects {
13 | project.evaluationDependsOn(":app")
14 | }
15 |
16 | tasks.register("clean", Delete) {
17 | delete rootProject.buildDir
18 | }
19 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: dropdown_pro_example
2 | description: An example app for the dropdown_pro package
3 |
4 | environment:
5 | sdk: ">=3.0.0 <4.0.0"
6 |
7 | dependencies:
8 | flutter:
9 | sdk: flutter
10 | dropdown_pro:
11 | path: ../ # Path to the main `dropdown_pro` package
12 |
13 | dev_dependencies:
14 | flutter_test:
15 | sdk: flutter
16 |
17 | flutter:
18 | uses-material-design: true
19 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/lib/src/utils/dropdown_utils.dart:
--------------------------------------------------------------------------------
1 | import '../models/dropdown_model.dart';
2 |
3 | double calculateDropdownHeight(
4 | double itemHeight, int maxVisibleItems, List items) {
5 | return items.length <= maxVisibleItems
6 | ? items.length * itemHeight
7 | : maxVisibleItems * itemHeight;
8 | }
9 |
10 | String getItemTitle(T item) {
11 | if (item is DropdownModel) {
12 | return item.title;
13 | }
14 | return item.toString();
15 | }
16 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/lib/src/utils/input_field_utils.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | Widget buildSearchField(
4 | TextEditingController controller, Function(String) onChanged) {
5 | return Padding(
6 | padding: const EdgeInsets.symmetric(horizontal: 16.0),
7 | child: TextField(
8 | controller: controller,
9 | onChanged: onChanged,
10 | decoration: InputDecoration(
11 | hintText: 'Search...',
12 | border: OutlineInputBorder(borderRadius: BorderRadius.circular(8)),
13 | ),
14 | ),
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # example
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13 |
14 | For help getting started with Flutter development, view the
15 | [online documentation](https://docs.flutter.dev/), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }()
9 |
10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
11 |
12 | repositories {
13 | google()
14 | mavenCentral()
15 | gradlePluginPortal()
16 | }
17 | }
18 |
19 | plugins {
20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21 | id "com.android.application" version "7.3.0" apply false
22 | id "org.jetbrains.kotlin.android" version "1.7.10" apply false
23 | }
24 |
25 | include ":app"
26 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Symbolication related
35 | app.*.symbols
36 |
37 | # Obfuscation related
38 | app.*.map.json
39 |
40 | # Android Studio will place build artifacts here
41 | /android/app/debug
42 | /android/app/profile
43 | /android/app/release
44 |
--------------------------------------------------------------------------------
/dropdown_pro.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: "80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819"
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: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
17 | base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
18 | - platform: android
19 | create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
20 | base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
21 |
22 | # User provided section
23 |
24 | # List of Local paths (relative to this file) that should be
25 | # ignored by the migrate tool.
26 | #
27 | # Files that are not part of the templates will be ignored by default.
28 | unmanaged_files:
29 | - 'lib/main.dart'
30 | - 'ios/Runner.xcodeproj/project.pbxproj'
31 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
13 |
14 | TODO: Put a short description of the package here that helps potential users
15 | know whether this package might be useful for them.
16 |
17 | ## Features
18 |
19 | TODO: List what your package can do. Maybe include images, gifs, or videos.
20 |
21 | ## Getting started
22 |
23 | TODO: List prerequisites and provide or point to information on how to
24 | start using the package.
25 |
26 | ## Usage
27 |
28 | TODO: Include short and useful examples for package users. Add longer examples
29 | to `/example` folder.
30 |
31 | ```dart
32 | const like = 'sample';
33 | ```
34 |
35 |
36 |
--------------------------------------------------------------------------------
/.dart_tool/extension_discovery/README.md:
--------------------------------------------------------------------------------
1 | Extension Discovery Cache
2 | =========================
3 |
4 | This folder is used by `package:extension_discovery` to cache lists of
5 | packages that contains extensions for other packages.
6 |
7 | DO NOT USE THIS FOLDER
8 | ----------------------
9 |
10 | * Do not read (or rely) the contents of this folder.
11 | * Do write to this folder.
12 |
13 | If you're interested in the lists of extensions stored in this folder use the
14 | API offered by package `extension_discovery` to get this information.
15 |
16 | If this package doesn't work for your use-case, then don't try to read the
17 | contents of this folder. It may change, and will not remain stable.
18 |
19 | Use package `extension_discovery`
20 | ---------------------------------
21 |
22 | If you want to access information from this folder.
23 |
24 | Feel free to delete this folder
25 | -------------------------------
26 |
27 | Files in this folder act as a cache, and the cache is discarded if the files
28 | are older than the modification time of `.dart_tool/package_config.json`.
29 |
30 | Hence, it should never be necessary to clear this cache manually, if you find a
31 | need to do please file a bug.
32 |
--------------------------------------------------------------------------------
/example/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility 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:dropdown_pro_example/main.dart';
9 | import 'package:flutter/material.dart';
10 | import 'package:flutter_test/flutter_test.dart';
11 |
12 | void main() {
13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
14 | // Build our app and trigger a frame.
15 | await tester.pumpWidget(const MyApp());
16 |
17 | // Verify that our counter starts at 0.
18 | expect(find.text('0'), findsOneWidget);
19 | expect(find.text('1'), findsNothing);
20 |
21 | // Tap the '+' icon and trigger a frame.
22 | await tester.tap(find.byIcon(Icons.add));
23 | await tester.pump();
24 |
25 | // Verify that our counter has incremented.
26 | expect(find.text('0'), findsNothing);
27 | expect(find.text('1'), findsOneWidget);
28 | });
29 | }
30 |
--------------------------------------------------------------------------------
/.idea/libraries/Dart_SDK.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/lib/src/utils/overlay_utils.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../constants/dimensions.dart';
4 | import '../models/dropdown_model.dart';
5 |
6 | // Function to create the overlay entry for the dropdown items
7 | OverlayEntry createOverlayEntry({
8 | required BuildContext context,
9 | required LayerLink layerLink,
10 | required List filteredItems,
11 | required VoidCallback closeDropdown,
12 | }) {
13 | return OverlayEntry(
14 | builder: (context) => Positioned(
15 | width: MediaQuery.of(context).size.width * 0.8,
16 | child: CompositedTransformFollower(
17 | link: layerLink,
18 | showWhenUnlinked: false,
19 | offset: const Offset(0, Dimensions.inputBoxHeight + 5.0),
20 | child: Material(
21 | color: Colors.white, // Background color of the dropdown
22 | elevation: 4.0, // Optional: add shadow
23 | child: ListView(
24 | padding: EdgeInsets.zero,
25 | shrinkWrap: true,
26 | children: filteredItems.map((item) {
27 | return ListTile(
28 | title: Text(item.title),
29 | onTap: () {
30 | closeDropdown();
31 | // Add other selection logic here if needed
32 | },
33 | );
34 | }).toList(),
35 | ),
36 | ),
37 | ),
38 | ),
39 | );
40 | }
41 |
--------------------------------------------------------------------------------
/example/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 |
11 | linter:
12 | # The lint rules applied to this project can be customized in the
13 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
14 | # included above or to enable additional rules. A list of all available lints
15 | # and their documentation is published at https://dart.dev/lints.
16 | #
17 | # Instead of disabling a lint rule for the entire project in the
18 | # section below, it can also be suppressed for a single line of code
19 | # or a specific dart file by using the `// ignore: name_of_lint` and
20 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
21 | # producing the lint.
22 | rules:
23 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
24 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
25 | # Additional information about this file can be found at
26 | # https://dart.dev/guides/language/analysis-options
27 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5 | id "dev.flutter.flutter-gradle-plugin"
6 | }
7 |
8 | android {
9 | namespace = "com.example.example"
10 | compileSdk = flutter.compileSdkVersion
11 | ndkVersion = flutter.ndkVersion
12 |
13 | compileOptions {
14 | sourceCompatibility = JavaVersion.VERSION_1_8
15 | targetCompatibility = JavaVersion.VERSION_1_8
16 | }
17 |
18 | kotlinOptions {
19 | jvmTarget = JavaVersion.VERSION_1_8
20 | }
21 |
22 | defaultConfig {
23 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24 | applicationId = "com.example.example"
25 | // You can update the following values to match your application needs.
26 | // For more information, see: https://flutter.dev/to/review-gradle-config.
27 | minSdk = flutter.minSdkVersion
28 | targetSdk = flutter.targetSdkVersion
29 | versionCode = flutter.versionCode
30 | versionName = flutter.versionName
31 | }
32 |
33 | buildTypes {
34 | release {
35 | // TODO: Add your own signing config for the release build.
36 | // Signing with the debug keys for now, so `flutter run --release` works.
37 | signingConfig = signingConfigs.debug
38 | }
39 | }
40 | }
41 |
42 | flutter {
43 | source = "../.."
44 | }
45 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: dropdown_pro
2 | description: "A new Flutter package project."
3 | version: 0.0.1
4 | homepage:
5 |
6 | environment:
7 | sdk: ^3.5.0
8 | flutter: ">=1.17.0"
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 | get: ^4.6.6
14 |
15 | dev_dependencies:
16 | flutter_test:
17 | sdk: flutter
18 | flutter_lints: ^4.0.0
19 |
20 | # For information on the generic Dart part of this file, see the
21 | # following page: https://dart.dev/tools/pub/pubspec
22 |
23 | # The following section is specific to Flutter packages.
24 | flutter:
25 |
26 | # To add assets to your package, add an assets section, like this:
27 | # assets:
28 | # - images/a_dot_burr.jpeg
29 | # - images/a_dot_ham.jpeg
30 | #
31 | # For details regarding assets in packages, see
32 | # https://flutter.dev/to/asset-from-package
33 | #
34 | # An image asset can refer to one or more resolution-specific "variants", see
35 | # https://flutter.dev/to/resolution-aware-images
36 |
37 | # To add custom fonts to your package, add a fonts section here,
38 | # in this "flutter" section. Each entry in this list should have a
39 | # "family" key with the font family name, and a "fonts" key with a
40 | # list giving the asset and other descriptors for the font. For
41 | # example:
42 | # fonts:
43 | # - family: Schyler
44 | # fonts:
45 | # - asset: fonts/Schyler-Regular.ttf
46 | # - asset: fonts/Schyler-Italic.ttf
47 | # style: italic
48 | # - family: Trajan Pro
49 | # fonts:
50 | # - asset: fonts/TrajanPro.ttf
51 | # - asset: fonts/TrajanPro_Bold.ttf
52 | # weight: 700
53 | #
54 | # For details regarding fonts in packages, see
55 | # https://flutter.dev/to/font-from-package
56 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:dropdown_pro/dropdown_pro.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | void main() {
5 | runApp(const MyApp());
6 | }
7 |
8 | class MyApp extends StatelessWidget {
9 | const MyApp({super.key});
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return MaterialApp(
14 | title: 'Dropdown Pro Example',
15 | theme: ThemeData(
16 | primarySwatch: Colors.blue,
17 | visualDensity: VisualDensity.adaptivePlatformDensity,
18 | ),
19 | home: const MyHomePage(),
20 | );
21 | }
22 | }
23 |
24 | class ItemModel implements DropdownModel {
25 | final String label;
26 | ItemModel(this.label);
27 |
28 | @override
29 | String get title => label;
30 | }
31 |
32 | class MyHomePage extends StatefulWidget {
33 | const MyHomePage({super.key});
34 |
35 | @override
36 | _MyHomePageState createState() => _MyHomePageState();
37 | }
38 |
39 | class _MyHomePageState extends State {
40 | List items = [
41 | 'Item 1',
42 | 'Item 2',
43 | 'Item 3',
44 | ];
45 |
46 | String? selectedItem;
47 |
48 | @override
49 | Widget build(BuildContext context) {
50 | return Scaffold(
51 | appBar: AppBar(
52 | title: const Text('Dropdown Pro Example'),
53 | ),
54 | body: Padding(
55 | padding: const EdgeInsets.all(20.0),
56 | child: Column(
57 | children: [
58 | DropdownPro(
59 | itemsList: items,
60 | enableSearch: true,
61 | onChanged: (item) {
62 | setState(() {
63 | selectedItem = item;
64 | });
65 | },
66 | ),
67 | const SizedBox(height: 20),
68 | ],
69 | ),
70 | ),
71 | );
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/lib/src/widgets/dropdown_list.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../models/dropdown_model.dart';
4 |
5 | class DropdownList extends StatelessWidget {
6 | final List filteredItems;
7 | final double dropdownHeight;
8 | final ValueChanged? onChanged; // Callback to handle item selection
9 | final T? selectedItem; // Pass selectedItem as a parameter
10 |
11 | const DropdownList({
12 | required this.filteredItems,
13 | required this.dropdownHeight,
14 | this.onChanged,
15 | required this.selectedItem,
16 | super.key,
17 | });
18 |
19 | // Method to get the title of an item based on its type
20 | String _getItemTitle(T item) {
21 | if (item is DropdownModel) {
22 | return item.title; // If the item is a DropdownModel, return its title.
23 | } else if (item is String) {
24 | return item; // If the item is a String, return it directly.
25 | } else {
26 | throw ArgumentError(
27 | 'Unsupported item type: ${item.runtimeType}'); // Handle unsupported types
28 | }
29 | }
30 |
31 | @override
32 | Widget build(BuildContext context) {
33 | return SizedBox(
34 | height: dropdownHeight,
35 | child: Material(
36 | color: Colors.white,
37 | elevation: 4.0,
38 | child: ListView.builder(
39 | itemCount: filteredItems.length,
40 | itemBuilder: (context, index) {
41 | final item = filteredItems[index];
42 | return ListTile(
43 | title: Text(_getItemTitle(
44 | item)), // Use _getItemTitle to display the item's title
45 | tileColor: item == selectedItem
46 | ? Colors.blue[100]
47 | : null, // Highlight selected item
48 | onTap: () {
49 | // Notify the parent widget when an item is selected
50 | onChanged?.call(item);
51 | },
52 | );
53 | },
54 | ),
55 | ),
56 | );
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
15 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
34 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/.dart_tool/package_config_subset:
--------------------------------------------------------------------------------
1 | async
2 | 2.18
3 | file:///home/joy/.pub-cache/hosted/pub.dev/async-2.11.0/
4 | file:///home/joy/.pub-cache/hosted/pub.dev/async-2.11.0/lib/
5 | boolean_selector
6 | 2.17
7 | file:///home/joy/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/
8 | file:///home/joy/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/lib/
9 | characters
10 | 2.12
11 | file:///home/joy/.pub-cache/hosted/pub.dev/characters-1.3.0/
12 | file:///home/joy/.pub-cache/hosted/pub.dev/characters-1.3.0/lib/
13 | clock
14 | 2.12
15 | file:///home/joy/.pub-cache/hosted/pub.dev/clock-1.1.1/
16 | file:///home/joy/.pub-cache/hosted/pub.dev/clock-1.1.1/lib/
17 | collection
18 | 2.18
19 | file:///home/joy/.pub-cache/hosted/pub.dev/collection-1.18.0/
20 | file:///home/joy/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/
21 | fake_async
22 | 2.12
23 | file:///home/joy/.pub-cache/hosted/pub.dev/fake_async-1.3.1/
24 | file:///home/joy/.pub-cache/hosted/pub.dev/fake_async-1.3.1/lib/
25 | flutter_lints
26 | 3.1
27 | file:///home/joy/.pub-cache/hosted/pub.dev/flutter_lints-4.0.0/
28 | file:///home/joy/.pub-cache/hosted/pub.dev/flutter_lints-4.0.0/lib/
29 | get
30 | 2.15
31 | file:///home/joy/.pub-cache/hosted/pub.dev/get-4.6.6/
32 | file:///home/joy/.pub-cache/hosted/pub.dev/get-4.6.6/lib/
33 | leak_tracker
34 | 3.2
35 | file:///home/joy/.pub-cache/hosted/pub.dev/leak_tracker-10.0.5/
36 | file:///home/joy/.pub-cache/hosted/pub.dev/leak_tracker-10.0.5/lib/
37 | leak_tracker_flutter_testing
38 | 3.2
39 | file:///home/joy/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.5/
40 | file:///home/joy/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.5/lib/
41 | leak_tracker_testing
42 | 3.2
43 | file:///home/joy/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1/
44 | file:///home/joy/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1/lib/
45 | lints
46 | 3.1
47 | file:///home/joy/.pub-cache/hosted/pub.dev/lints-4.0.0/
48 | file:///home/joy/.pub-cache/hosted/pub.dev/lints-4.0.0/lib/
49 | matcher
50 | 3.0
51 | file:///home/joy/.pub-cache/hosted/pub.dev/matcher-0.12.16+1/
52 | file:///home/joy/.pub-cache/hosted/pub.dev/matcher-0.12.16+1/lib/
53 | material_color_utilities
54 | 2.17
55 | file:///home/joy/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1/
56 | file:///home/joy/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1/lib/
57 | meta
58 | 2.12
59 | file:///home/joy/.pub-cache/hosted/pub.dev/meta-1.15.0/
60 | file:///home/joy/.pub-cache/hosted/pub.dev/meta-1.15.0/lib/
61 | path
62 | 3.0
63 | file:///home/joy/.pub-cache/hosted/pub.dev/path-1.9.0/
64 | file:///home/joy/.pub-cache/hosted/pub.dev/path-1.9.0/lib/
65 | source_span
66 | 2.18
67 | file:///home/joy/.pub-cache/hosted/pub.dev/source_span-1.10.0/
68 | file:///home/joy/.pub-cache/hosted/pub.dev/source_span-1.10.0/lib/
69 | stack_trace
70 | 2.18
71 | file:///home/joy/.pub-cache/hosted/pub.dev/stack_trace-1.11.1/
72 | file:///home/joy/.pub-cache/hosted/pub.dev/stack_trace-1.11.1/lib/
73 | stream_channel
74 | 2.19
75 | file:///home/joy/.pub-cache/hosted/pub.dev/stream_channel-2.1.2/
76 | file:///home/joy/.pub-cache/hosted/pub.dev/stream_channel-2.1.2/lib/
77 | string_scanner
78 | 2.18
79 | file:///home/joy/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/
80 | file:///home/joy/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/lib/
81 | term_glyph
82 | 2.12
83 | file:///home/joy/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/
84 | file:///home/joy/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/lib/
85 | test_api
86 | 3.2
87 | file:///home/joy/.pub-cache/hosted/pub.dev/test_api-0.7.2/
88 | file:///home/joy/.pub-cache/hosted/pub.dev/test_api-0.7.2/lib/
89 | vector_math
90 | 2.14
91 | file:///home/joy/.pub-cache/hosted/pub.dev/vector_math-2.1.4/
92 | file:///home/joy/.pub-cache/hosted/pub.dev/vector_math-2.1.4/lib/
93 | vm_service
94 | 3.3
95 | file:///home/joy/.pub-cache/hosted/pub.dev/vm_service-14.2.4/
96 | file:///home/joy/.pub-cache/hosted/pub.dev/vm_service-14.2.4/lib/
97 | dropdown_pro
98 | 3.5
99 | file:///home/joy/dropdown_pro/
100 | file:///home/joy/dropdown_pro/lib/
101 | sky_engine
102 | 3.2
103 | file:///home/joy/snap/flutter/common/flutter/bin/cache/pkg/sky_engine/
104 | file:///home/joy/snap/flutter/common/flutter/bin/cache/pkg/sky_engine/lib/
105 | flutter
106 | 3.3
107 | file:///home/joy/snap/flutter/common/flutter/packages/flutter/
108 | file:///home/joy/snap/flutter/common/flutter/packages/flutter/lib/
109 | flutter_test
110 | 3.3
111 | file:///home/joy/snap/flutter/common/flutter/packages/flutter_test/
112 | file:///home/joy/snap/flutter/common/flutter/packages/flutter_test/lib/
113 | 2
114 |
--------------------------------------------------------------------------------
/lib/src/widgets/dropdown_pro.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../constants/dimensions.dart';
4 | import '../models/dropdown_model.dart';
5 | import '../themes/custom_color.dart';
6 | import 'dropdown_list.dart';
7 |
8 | class DropdownPro extends StatefulWidget {
9 | final List itemsList;
10 | final ValueChanged? onChanged;
11 | final bool enableSearch;
12 |
13 | const DropdownPro({
14 | required this.itemsList,
15 | this.onChanged,
16 | this.enableSearch = false, // Enable or disable the search feature
17 | super.key,
18 | });
19 |
20 | @override
21 | _DropdownProState createState() => _DropdownProState();
22 | }
23 |
24 | class _DropdownProState extends State> {
25 | bool isDropdownOpened = false;
26 | TextEditingController searchController = TextEditingController();
27 | List filteredItems = [];
28 | dynamic selectedItem;
29 |
30 | @override
31 | void initState() {
32 | super.initState();
33 | filteredItems = widget.itemsList;
34 | }
35 |
36 | // Method to get the title of an item based on its type
37 | String _getItemTitle(T item) {
38 | if (item is DropdownModel) {
39 | return item.title; // If the item is a DropdownModel, return its title.
40 | } else if (item is String) {
41 | return item; // If the item is a String, return it directly.
42 | } else {
43 | throw ArgumentError(
44 | 'Unsupported item type: ${item.runtimeType}',
45 | ); // Handle unsupported types
46 | }
47 | }
48 |
49 | void _toggleDropdown() {
50 | setState(() {
51 | isDropdownOpened = !isDropdownOpened;
52 | if (!isDropdownOpened) {
53 | filteredItems = widget.itemsList;
54 | searchController.clear();
55 | }
56 | });
57 | }
58 |
59 | void _onSearchChanged(String value) {
60 | setState(() {
61 | filteredItems = widget.itemsList
62 | .where((item) =>
63 | _getItemTitle(item).toLowerCase().contains(value.toLowerCase()))
64 | .toList();
65 | });
66 | }
67 |
68 | @override
69 | Widget build(BuildContext context) {
70 | return GestureDetector(
71 | onTap: _toggleDropdown,
72 | child: Column(
73 | crossAxisAlignment: CrossAxisAlignment.start,
74 | children: [
75 | Container(
76 | height: Dimensions.inputBoxHeight,
77 | padding: const EdgeInsets.symmetric(horizontal: 8.0),
78 | decoration: BoxDecoration(
79 | borderRadius: BorderRadius.circular(Dimensions.radius),
80 | border: Border.all(color: CustomColor.primary),
81 | ),
82 | child: Row(
83 | children: [
84 | Expanded(
85 | child: Text(
86 | selectedItem != null
87 | ? _getItemTitle(selectedItem)
88 | : 'Select Item',
89 | style: TextStyle(
90 | color: selectedItem != null ? Colors.black : Colors.grey,
91 | ),
92 | ),
93 | ),
94 | const Icon(Icons.arrow_drop_down, color: CustomColor.primary),
95 | ],
96 | ),
97 | ),
98 | if (isDropdownOpened)
99 | Column(
100 | children: [
101 | if (widget.enableSearch)
102 | Padding(
103 | padding: const EdgeInsets.symmetric(vertical: 8.0),
104 | child: TextField(
105 | controller: searchController,
106 | onChanged: _onSearchChanged,
107 | decoration: const InputDecoration(
108 | hintText: 'Search...',
109 | border: OutlineInputBorder(),
110 | ),
111 | ),
112 | ),
113 | DropdownList(
114 | filteredItems: filteredItems,
115 | dropdownHeight: 200,
116 | onChanged: (item) {
117 | widget.onChanged?.call(item);
118 | setState(() {
119 | selectedItem = item;
120 | isDropdownOpened = false;
121 | });
122 | },
123 | selectedItem: selectedItem,
124 | ),
125 | ],
126 | ),
127 | ],
128 | ),
129 | );
130 | }
131 |
132 | @override
133 | void dispose() {
134 | searchController.dispose();
135 | super.dispose();
136 | }
137 | }
138 |
--------------------------------------------------------------------------------
/.dart_tool/package_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "configVersion": 2,
3 | "packages": [
4 | {
5 | "name": "async",
6 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/async-2.11.0",
7 | "packageUri": "lib/",
8 | "languageVersion": "2.18"
9 | },
10 | {
11 | "name": "boolean_selector",
12 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1",
13 | "packageUri": "lib/",
14 | "languageVersion": "2.17"
15 | },
16 | {
17 | "name": "characters",
18 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/characters-1.3.0",
19 | "packageUri": "lib/",
20 | "languageVersion": "2.12"
21 | },
22 | {
23 | "name": "clock",
24 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/clock-1.1.1",
25 | "packageUri": "lib/",
26 | "languageVersion": "2.12"
27 | },
28 | {
29 | "name": "collection",
30 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/collection-1.18.0",
31 | "packageUri": "lib/",
32 | "languageVersion": "2.18"
33 | },
34 | {
35 | "name": "fake_async",
36 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/fake_async-1.3.1",
37 | "packageUri": "lib/",
38 | "languageVersion": "2.12"
39 | },
40 | {
41 | "name": "flutter",
42 | "rootUri": "file:///home/joy/snap/flutter/common/flutter/packages/flutter",
43 | "packageUri": "lib/",
44 | "languageVersion": "3.3"
45 | },
46 | {
47 | "name": "flutter_lints",
48 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/flutter_lints-4.0.0",
49 | "packageUri": "lib/",
50 | "languageVersion": "3.1"
51 | },
52 | {
53 | "name": "flutter_test",
54 | "rootUri": "file:///home/joy/snap/flutter/common/flutter/packages/flutter_test",
55 | "packageUri": "lib/",
56 | "languageVersion": "3.3"
57 | },
58 | {
59 | "name": "get",
60 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/get-4.6.6",
61 | "packageUri": "lib/",
62 | "languageVersion": "2.15"
63 | },
64 | {
65 | "name": "leak_tracker",
66 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/leak_tracker-10.0.5",
67 | "packageUri": "lib/",
68 | "languageVersion": "3.2"
69 | },
70 | {
71 | "name": "leak_tracker_flutter_testing",
72 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.5",
73 | "packageUri": "lib/",
74 | "languageVersion": "3.2"
75 | },
76 | {
77 | "name": "leak_tracker_testing",
78 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1",
79 | "packageUri": "lib/",
80 | "languageVersion": "3.2"
81 | },
82 | {
83 | "name": "lints",
84 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/lints-4.0.0",
85 | "packageUri": "lib/",
86 | "languageVersion": "3.1"
87 | },
88 | {
89 | "name": "matcher",
90 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/matcher-0.12.16+1",
91 | "packageUri": "lib/",
92 | "languageVersion": "3.0"
93 | },
94 | {
95 | "name": "material_color_utilities",
96 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1",
97 | "packageUri": "lib/",
98 | "languageVersion": "2.17"
99 | },
100 | {
101 | "name": "meta",
102 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/meta-1.15.0",
103 | "packageUri": "lib/",
104 | "languageVersion": "2.12"
105 | },
106 | {
107 | "name": "path",
108 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/path-1.9.0",
109 | "packageUri": "lib/",
110 | "languageVersion": "3.0"
111 | },
112 | {
113 | "name": "sky_engine",
114 | "rootUri": "file:///home/joy/snap/flutter/common/flutter/bin/cache/pkg/sky_engine",
115 | "packageUri": "lib/",
116 | "languageVersion": "3.2"
117 | },
118 | {
119 | "name": "source_span",
120 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/source_span-1.10.0",
121 | "packageUri": "lib/",
122 | "languageVersion": "2.18"
123 | },
124 | {
125 | "name": "stack_trace",
126 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/stack_trace-1.11.1",
127 | "packageUri": "lib/",
128 | "languageVersion": "2.18"
129 | },
130 | {
131 | "name": "stream_channel",
132 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/stream_channel-2.1.2",
133 | "packageUri": "lib/",
134 | "languageVersion": "2.19"
135 | },
136 | {
137 | "name": "string_scanner",
138 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/string_scanner-1.2.0",
139 | "packageUri": "lib/",
140 | "languageVersion": "2.18"
141 | },
142 | {
143 | "name": "term_glyph",
144 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/term_glyph-1.2.1",
145 | "packageUri": "lib/",
146 | "languageVersion": "2.12"
147 | },
148 | {
149 | "name": "test_api",
150 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/test_api-0.7.2",
151 | "packageUri": "lib/",
152 | "languageVersion": "3.2"
153 | },
154 | {
155 | "name": "vector_math",
156 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/vector_math-2.1.4",
157 | "packageUri": "lib/",
158 | "languageVersion": "2.14"
159 | },
160 | {
161 | "name": "vm_service",
162 | "rootUri": "file:///home/joy/.pub-cache/hosted/pub.dev/vm_service-14.2.4",
163 | "packageUri": "lib/",
164 | "languageVersion": "3.3"
165 | },
166 | {
167 | "name": "dropdown_pro",
168 | "rootUri": "../",
169 | "packageUri": "lib/",
170 | "languageVersion": "3.5"
171 | }
172 | ],
173 | "generated": "2024-11-09T10:01:12.034768Z",
174 | "generator": "pub",
175 | "generatorVersion": "3.5.0",
176 | "flutterRoot": "file:///home/joy/snap/flutter/common/flutter",
177 | "flutterVersion": "3.24.0",
178 | "pubCache": "file:///home/joy/.pub-cache"
179 | }
180 |
--------------------------------------------------------------------------------
/example/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "2.11.0"
12 | boolean_selector:
13 | dependency: transitive
14 | description:
15 | name: boolean_selector
16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "2.1.1"
20 | characters:
21 | dependency: transitive
22 | description:
23 | name: characters
24 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
25 | url: "https://pub.dev"
26 | source: hosted
27 | version: "1.3.0"
28 | clock:
29 | dependency: transitive
30 | description:
31 | name: clock
32 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33 | url: "https://pub.dev"
34 | source: hosted
35 | version: "1.1.1"
36 | collection:
37 | dependency: transitive
38 | description:
39 | name: collection
40 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
41 | url: "https://pub.dev"
42 | source: hosted
43 | version: "1.18.0"
44 | dropdown_pro:
45 | dependency: "direct main"
46 | description:
47 | path: ".."
48 | relative: true
49 | source: path
50 | version: "0.0.1"
51 | fake_async:
52 | dependency: transitive
53 | description:
54 | name: fake_async
55 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
56 | url: "https://pub.dev"
57 | source: hosted
58 | version: "1.3.1"
59 | flutter:
60 | dependency: "direct main"
61 | description: flutter
62 | source: sdk
63 | version: "0.0.0"
64 | flutter_test:
65 | dependency: "direct dev"
66 | description: flutter
67 | source: sdk
68 | version: "0.0.0"
69 | get:
70 | dependency: transitive
71 | description:
72 | name: get
73 | sha256: e4e7335ede17452b391ed3b2ede016545706c01a02292a6c97619705e7d2a85e
74 | url: "https://pub.dev"
75 | source: hosted
76 | version: "4.6.6"
77 | leak_tracker:
78 | dependency: transitive
79 | description:
80 | name: leak_tracker
81 | sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
82 | url: "https://pub.dev"
83 | source: hosted
84 | version: "10.0.5"
85 | leak_tracker_flutter_testing:
86 | dependency: transitive
87 | description:
88 | name: leak_tracker_flutter_testing
89 | sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
90 | url: "https://pub.dev"
91 | source: hosted
92 | version: "3.0.5"
93 | leak_tracker_testing:
94 | dependency: transitive
95 | description:
96 | name: leak_tracker_testing
97 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
98 | url: "https://pub.dev"
99 | source: hosted
100 | version: "3.0.1"
101 | matcher:
102 | dependency: transitive
103 | description:
104 | name: matcher
105 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
106 | url: "https://pub.dev"
107 | source: hosted
108 | version: "0.12.16+1"
109 | material_color_utilities:
110 | dependency: transitive
111 | description:
112 | name: material_color_utilities
113 | sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
114 | url: "https://pub.dev"
115 | source: hosted
116 | version: "0.11.1"
117 | meta:
118 | dependency: transitive
119 | description:
120 | name: meta
121 | sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
122 | url: "https://pub.dev"
123 | source: hosted
124 | version: "1.15.0"
125 | path:
126 | dependency: transitive
127 | description:
128 | name: path
129 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
130 | url: "https://pub.dev"
131 | source: hosted
132 | version: "1.9.0"
133 | sky_engine:
134 | dependency: transitive
135 | description: flutter
136 | source: sdk
137 | version: "0.0.99"
138 | source_span:
139 | dependency: transitive
140 | description:
141 | name: source_span
142 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
143 | url: "https://pub.dev"
144 | source: hosted
145 | version: "1.10.0"
146 | stack_trace:
147 | dependency: transitive
148 | description:
149 | name: stack_trace
150 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
151 | url: "https://pub.dev"
152 | source: hosted
153 | version: "1.11.1"
154 | stream_channel:
155 | dependency: transitive
156 | description:
157 | name: stream_channel
158 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
159 | url: "https://pub.dev"
160 | source: hosted
161 | version: "2.1.2"
162 | string_scanner:
163 | dependency: transitive
164 | description:
165 | name: string_scanner
166 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
167 | url: "https://pub.dev"
168 | source: hosted
169 | version: "1.2.0"
170 | term_glyph:
171 | dependency: transitive
172 | description:
173 | name: term_glyph
174 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
175 | url: "https://pub.dev"
176 | source: hosted
177 | version: "1.2.1"
178 | test_api:
179 | dependency: transitive
180 | description:
181 | name: test_api
182 | sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
183 | url: "https://pub.dev"
184 | source: hosted
185 | version: "0.7.2"
186 | vector_math:
187 | dependency: transitive
188 | description:
189 | name: vector_math
190 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
191 | url: "https://pub.dev"
192 | source: hosted
193 | version: "2.1.4"
194 | vm_service:
195 | dependency: transitive
196 | description:
197 | name: vm_service
198 | sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
199 | url: "https://pub.dev"
200 | source: hosted
201 | version: "14.2.4"
202 | sdks:
203 | dart: ">=3.5.0 <4.0.0"
204 | flutter: ">=3.18.0-18.0.pre.54"
205 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "2.11.0"
12 | boolean_selector:
13 | dependency: transitive
14 | description:
15 | name: boolean_selector
16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "2.1.1"
20 | characters:
21 | dependency: transitive
22 | description:
23 | name: characters
24 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
25 | url: "https://pub.dev"
26 | source: hosted
27 | version: "1.3.0"
28 | clock:
29 | dependency: transitive
30 | description:
31 | name: clock
32 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33 | url: "https://pub.dev"
34 | source: hosted
35 | version: "1.1.1"
36 | collection:
37 | dependency: transitive
38 | description:
39 | name: collection
40 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
41 | url: "https://pub.dev"
42 | source: hosted
43 | version: "1.18.0"
44 | fake_async:
45 | dependency: transitive
46 | description:
47 | name: fake_async
48 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
49 | url: "https://pub.dev"
50 | source: hosted
51 | version: "1.3.1"
52 | flutter:
53 | dependency: "direct main"
54 | description: flutter
55 | source: sdk
56 | version: "0.0.0"
57 | flutter_lints:
58 | dependency: "direct dev"
59 | description:
60 | name: flutter_lints
61 | sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
62 | url: "https://pub.dev"
63 | source: hosted
64 | version: "4.0.0"
65 | flutter_test:
66 | dependency: "direct dev"
67 | description: flutter
68 | source: sdk
69 | version: "0.0.0"
70 | get:
71 | dependency: "direct main"
72 | description:
73 | name: get
74 | sha256: e4e7335ede17452b391ed3b2ede016545706c01a02292a6c97619705e7d2a85e
75 | url: "https://pub.dev"
76 | source: hosted
77 | version: "4.6.6"
78 | leak_tracker:
79 | dependency: transitive
80 | description:
81 | name: leak_tracker
82 | sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
83 | url: "https://pub.dev"
84 | source: hosted
85 | version: "10.0.5"
86 | leak_tracker_flutter_testing:
87 | dependency: transitive
88 | description:
89 | name: leak_tracker_flutter_testing
90 | sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
91 | url: "https://pub.dev"
92 | source: hosted
93 | version: "3.0.5"
94 | leak_tracker_testing:
95 | dependency: transitive
96 | description:
97 | name: leak_tracker_testing
98 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
99 | url: "https://pub.dev"
100 | source: hosted
101 | version: "3.0.1"
102 | lints:
103 | dependency: transitive
104 | description:
105 | name: lints
106 | sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
107 | url: "https://pub.dev"
108 | source: hosted
109 | version: "4.0.0"
110 | matcher:
111 | dependency: transitive
112 | description:
113 | name: matcher
114 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
115 | url: "https://pub.dev"
116 | source: hosted
117 | version: "0.12.16+1"
118 | material_color_utilities:
119 | dependency: transitive
120 | description:
121 | name: material_color_utilities
122 | sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
123 | url: "https://pub.dev"
124 | source: hosted
125 | version: "0.11.1"
126 | meta:
127 | dependency: transitive
128 | description:
129 | name: meta
130 | sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
131 | url: "https://pub.dev"
132 | source: hosted
133 | version: "1.15.0"
134 | path:
135 | dependency: transitive
136 | description:
137 | name: path
138 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
139 | url: "https://pub.dev"
140 | source: hosted
141 | version: "1.9.0"
142 | sky_engine:
143 | dependency: transitive
144 | description: flutter
145 | source: sdk
146 | version: "0.0.99"
147 | source_span:
148 | dependency: transitive
149 | description:
150 | name: source_span
151 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
152 | url: "https://pub.dev"
153 | source: hosted
154 | version: "1.10.0"
155 | stack_trace:
156 | dependency: transitive
157 | description:
158 | name: stack_trace
159 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
160 | url: "https://pub.dev"
161 | source: hosted
162 | version: "1.11.1"
163 | stream_channel:
164 | dependency: transitive
165 | description:
166 | name: stream_channel
167 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
168 | url: "https://pub.dev"
169 | source: hosted
170 | version: "2.1.2"
171 | string_scanner:
172 | dependency: transitive
173 | description:
174 | name: string_scanner
175 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
176 | url: "https://pub.dev"
177 | source: hosted
178 | version: "1.2.0"
179 | term_glyph:
180 | dependency: transitive
181 | description:
182 | name: term_glyph
183 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
184 | url: "https://pub.dev"
185 | source: hosted
186 | version: "1.2.1"
187 | test_api:
188 | dependency: transitive
189 | description:
190 | name: test_api
191 | sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
192 | url: "https://pub.dev"
193 | source: hosted
194 | version: "0.7.2"
195 | vector_math:
196 | dependency: transitive
197 | description:
198 | name: vector_math
199 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
200 | url: "https://pub.dev"
201 | source: hosted
202 | version: "2.1.4"
203 | vm_service:
204 | dependency: transitive
205 | description:
206 | name: vm_service
207 | sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
208 | url: "https://pub.dev"
209 | source: hosted
210 | version: "14.2.4"
211 | sdks:
212 | dart: ">=3.5.0 <4.0.0"
213 | flutter: ">=3.18.0-18.0.pre.54"
214 |
--------------------------------------------------------------------------------