├── .github └── workflows │ └── build-test.yml ├── .gitignore ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── coverage ├── coverage.json └── lcov.info ├── doc └── api │ ├── __404error.html │ ├── categories.json │ ├── index.html │ ├── index.json │ ├── static-assets │ ├── favicon.png │ ├── github.css │ ├── highlight.pack.js │ ├── play_button.svg │ ├── readme.md │ ├── script.js │ └── styles.css │ └── textfield_search │ ├── Debouncer-class.html │ ├── Debouncer │ ├── Debouncer.html │ ├── action.html │ ├── milliseconds.html │ └── run.html │ ├── TextFieldSearch-class.html │ ├── TextFieldSearch │ ├── TextFieldSearch.html │ ├── controller.html │ ├── createElement.html │ ├── createState.html │ ├── debugDescribeChildren.html │ ├── debugFillProperties.html │ ├── decoration.html │ ├── future.html │ ├── getSelectedValue.html │ ├── hashCode.html │ ├── initialList.html │ ├── key.html │ ├── label.html │ ├── minStringLength.html │ ├── operator_equals.html │ ├── textStyle.html │ ├── toDiagnosticsNode.html │ ├── toString.html │ ├── toStringDeep.html │ ├── toStringShallow.html │ └── toStringShort.html │ └── textfield_search-library.html ├── example ├── lib │ └── main.dart ├── pubspec.lock └── pubspec.yaml ├── flutter_textfield_search.iml ├── flutter_textfield_search_android.iml ├── lib └── textfield_search.dart ├── pubspec.lock ├── pubspec.yaml ├── test-coverage.sh └── test └── textfield_search_test.dart /.github/workflows/build-test.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: Build and Tests 4 | 5 | # Controls when the action will run. Triggers the workflow on push or pull request 6 | # events but only for the master branch 7 | on: 8 | pull_request: 9 | # types: [opened, reopened] 10 | paths-ignore: 11 | - 'coverage/**' 12 | branches: [ master ] 13 | 14 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 15 | jobs: 16 | # This workflow contains a single job called "build" 17 | build: 18 | name: Run Tests 19 | # The type of runner that the job will run on 20 | runs-on: ubuntu-latest 21 | # Steps represent a sequence of tasks that will be executed as part of the job 22 | steps: 23 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 24 | - uses: actions/checkout@v2 25 | with: 26 | ref: ${{ github.head_ref }} 27 | - uses: actions/setup-java@v1 28 | with: 29 | java-version: '12.x' 30 | - uses: subosito/flutter-action@v1 31 | with: 32 | channel: 'stable' 33 | - run: | 34 | flutter pub get 35 | flutter analyze 36 | flutter test --coverage 37 | bash test-coverage.sh 38 | git status 39 | git add . 40 | git config user.email "arindone@iapp.org" 41 | git config user.name "Alex Rindone" 42 | git commit --allow-empty -m "auto updating coverage.json and lcov.info" 43 | git push origin ${{ github.head_ref }} 44 | 45 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | .idea/ 8 | .vagrant/ 9 | .sconsign.dblite 10 | .svn/ 11 | 12 | *.swp 13 | profile 14 | 15 | DerivedData/ 16 | 17 | .generated/ 18 | 19 | *.pbxuser 20 | *.mode1v3 21 | *.mode2v3 22 | *.perspectivev3 23 | 24 | !default.pbxuser 25 | !default.mode1v3 26 | !default.mode2v3 27 | !default.perspectivev3 28 | 29 | xcuserdata 30 | 31 | *.moved-aside 32 | 33 | *.pyc 34 | *sync/ 35 | Icon? 36 | .tags* 37 | 38 | build/ 39 | .android/ 40 | .ios/ 41 | .flutter-plugins 42 | .flutter-plugins-dependencies 43 | 44 | # Symbolication related 45 | app.*.symbols 46 | 47 | # Obfuscation related 48 | app.*.map.json 49 | -------------------------------------------------------------------------------- /.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: e6b34c2b5c96bb95325269a29a84e83ed8909b5f 8 | channel: stable 9 | 10 | project_type: module 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | ## 0.11.1 3 | 7-23-2024 4 | - Upgrading static analysis 5 | - Upgrading documentation 6 | 7 | ## 0.11.0 8 | 7-21-2024 9 | - Upgrading various dependencies 10 | - Added support for cursorColor 11 | - Added support for resultsBackgroundColor 12 | - Added support for clearing TextField when no results are found and focus changes 13 | 14 | ## 0.10.0 15 | 4-19-2022 16 | - Adding support for styling scrollbar with longer lists 17 | - Adding support to change height of the scroll widget 18 | - Adding better tests and coverage for decoration of text input 19 | - special thanks to @maykhid for input and ideas on scrollbar decoration 20 | 21 | ## 0.9.2 22 | 1-22-2022 23 | - Fixing formatting 24 | 25 | ## 0.9.1 26 | 1-22-2022 27 | - Added documentation leveraging dartdoc 28 | 29 | ## 0.9.0 30 | 1-22-2022 31 | - Added null safety 32 | 33 | ## 0.8.0 34 | 3-3-2021 35 | - Added minStringLength which allows for setting a minimum query string length before executing search 36 | - Added support for InputDecoration through decoration 37 | - Added support for TextStyle through textStyle 38 | 39 | ## 0.7.0 40 | 10-13-2020 41 | - Fixing issue Class 'String' has no instance getter 'label' when 'No matching items.' is shown 42 | - Fixing test cases to check for when 'No matching items.' is found 43 | - Added functionality to clear the input if a user submits a TextField that doesn't match an item in the list 44 | - Added functionality to clear the input if a user submits a TextField as the list is currently loading 45 | 46 | ## 0.6.1 47 | 6-5-2020 48 | - Updating README.md to include functionality giphy 49 | - Adding loading spinner on value change to show results are being loaded when user interacts with input 50 | 51 | ## 0.6.0 52 | 6-3-2020 53 | - Added the ability to show a list of objects that have a required property of label (to display within the TextField) 54 | - Added getSelectedValue() callback function which returns the selected value which could be used to get an object instead of the TextField's value 55 | 56 | ## 0.5.0 57 | 5-31-2020 58 | - Added future parameter that allows for a Future that returns a list to be used 59 | - With the addition of the Future, users can now select an option from a list provided by a Future 60 | 61 | ## 0.4.0 62 | 5-27-2020 63 | - Added required param textFieldController so addEventListener can be used on passed in controller 64 | - Added ContrainedBox with a maximum height so the widget is scrollable and doesn't overflow outside the bounds of the screen 65 | 66 | ## 0.3.0 67 | 5-23-2020 68 | - Added automated testing to CI/CD pipelines 69 | - Added code coverage to CI/CD pipelines via bash script that's auto commited to repo 70 | 71 | ## 0.2.0 72 | Initial Release 73 | - Delivering an easy to use text field that searches through a predefined list of selectable options 74 | - Developers can set the label for the text field and the static list of options to be searched and selected from 75 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2020, Alex Rindone 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flutter_textfield_search 2 | ![Build and Test](https://github.com/alexrindone/flutter_textfield_search/workflows/Build%20and%20Tests/badge.svg) 3 | 4 | FTFS is a Flutter package which uses a TextField Widget to search and select a value from a list. It's a simple, lightweight, and fully tested package unlike other "autocomplete" or textfield search packages. View complete code coverage results in JSON format **[here](https://raw.githubusercontent.com/alexrindone/flutter_textfield_search/master/coverage/coverage.json)**. 5 | 6 | 7 | 8 | ## Usage 9 | To use this package, add flutter_textfield_search as a dependency in your pubsec.yaml file. 10 | 11 | ## Example 12 | Import the package. 13 | 14 | `import 'package:flutter_textfield_search/textfield_search.dart'`; 15 | 16 | Then include the widget anywhere you would normally use a TextField widget with a String for label, a List for initialList, and a TextEditingController for controller. 17 |
Example MaterialApp using TextFieldSearch Widget 18 |
19 | 20 | const label = "Some Label"; 21 | const dummyList = ['Item 1', 'Item 2', 'Item 3', 'Item 4', 'Item 5']; 22 | TextEditingController myController = TextEditingController(); 23 | MaterialApp( 24 | home: Scaffold( 25 | body: TextFieldSearch(initialList: dummyList, label: label, controller: myController) 26 | ), 27 | ) 28 | 29 | To get the value of the selected option, use addListener on the controller to listen for changes: 30 | 31 | @override 32 | void dispose() { 33 | // Clean up the controller when the widget is removed from the 34 | // widget tree. 35 | myController.dispose(); 36 | super.dispose(); 37 | } 38 | 39 | @override 40 | void initState() { 41 | super.initState(); 42 | // Start listening to changes. 43 | myController.addListener(_printLatestValue); 44 | } 45 | 46 | _printLatestValue() { 47 | print("Textfield value: ${myController.text}"); 48 | } 49 | 50 | Selecting a List item from a Future List: 51 | 52 | TextEditingController myController = TextEditingController(); 53 | 54 | // create a Future that returns List 55 | Future fetchData() async { 56 | await Future.delayed(Duration(milliseconds: 5000)); 57 | List _list = new List(); 58 | String _inputText = myController.text; 59 | // create a list from the text input of three items 60 | // to mock a list of items from an http call 61 | _list.add(_inputText + ' Item 1'); 62 | _list.add(_inputText + ' Item 2'); 63 | _list.add(_inputText + ' Item 3'); 64 | return _list; 65 | } 66 | 67 | @override 68 | void dispose() { 69 | // Clean up the controller when the widget is removed from the 70 | // widget tree. 71 | myController.dispose(); 72 | super.dispose(); 73 | } 74 | 75 | // used within a MaterialApp (code shortened) 76 | MaterialApp( 77 | home: Scaffold( 78 | body: TextFieldSearch( 79 | label: 'My Label', 80 | controller: myController 81 | future: () { 82 | return fetchData(); 83 | } 84 | ) 85 | ), 86 | ) 87 | 88 | Selecting an object from a Future List: 89 | 90 | TextEditingController myController = TextEditingController(); 91 | 92 | // create a Future that returns List 93 | // IMPORTANT: The list that gets returned from fetchData must have objects that have a label property. 94 | // The label property is what is used to populate the TextField while getSelectedValue returns the actual object selected 95 | Future fetchData() async { 96 | await Future.delayed(Duration(milliseconds: 3000)); 97 | List _list = new List(); 98 | String _inputText = myController.text; 99 | List _jsonList = [ 100 | { 101 | 'label': _inputText + ' Item 1', 102 | 'value': 30 103 | }, 104 | { 105 | 'label': _inputText + ' Item 2', 106 | 'value': 31 107 | }, 108 | { 109 | 'label': _inputText + ' Item 3', 110 | 'value': 32 111 | }, 112 | ]; 113 | // create a list of 3 objects from a fake json response 114 | _list.add(new TestItem.fromJson(_jsonList[0])); 115 | _list.add(new TestItem.fromJson(_jsonList[1])); 116 | _list.add(new TestItem.fromJson(_jsonList[2])); 117 | return _list; 118 | } 119 | 120 | @override 121 | void dispose() { 122 | // Clean up the controller when the widget is removed from the 123 | // widget tree. 124 | myController.dispose(); 125 | super.dispose(); 126 | } 127 | 128 | // used within a MaterialApp (code shortened) 129 | MaterialApp( 130 | home: Scaffold( 131 | body: TextFieldSearch( 132 | label: 'My Label', 133 | controller: myController 134 | future: () { 135 | return fetchData(); 136 | }, 137 | getSelectedValue: (value) { 138 | print(value); // this prints the selected option which could be an object 139 | } 140 | ) 141 | ), 142 | ) 143 | 144 | // Mock Test Item Class 145 | class TestItem { 146 | String label; 147 | dynamic value; 148 | TestItem({ 149 | this.label, 150 | this.value 151 | }); 152 | 153 | factory TestItem.fromJson(Map json) { 154 | return TestItem( 155 | label: json['label'], 156 | value: json['value'] 157 | ); 158 | } 159 | } 160 | 161 | ## Issues 162 | 163 | Please email any issues, bugs, or additional features you would like to see built to arindone@nubeer.io. 164 | 165 | ## Contributing 166 | 167 | If you wish to contribute to this package you may fork the repository and make a pull request to this repository. 168 |

**Note**: Testing by running `flutter test --coverage` will generate `coverage/lcov.info`. Running `bash test-coverage.sh` will parse the `lcov.info` file into JSON format. This happens automatically within the CI/CD pipeline on a pull request to master but it is always good to test locally. 169 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:lints/recommended.yaml -------------------------------------------------------------------------------- /coverage/coverage.json: -------------------------------------------------------------------------------- 1 | {"file":"lib/textfield_search.dart","lines":{"coverage_summary":"100.00% (174 of 174 lines)","found":"174","hit":"174","details":[{"line":"46","hit":"1"},{"line":"61","hit":"1"},{"line":"63","hit":"1"},{"line":"64","hit":"1"},{"line":"79","hit":"1"},{"line":"80","hit":"1"},{"line":"81","hit":"2"},{"line":"83","hit":"1"},{"line":"84","hit":"1"},{"line":"87","hit":"2"},{"line":"90","hit":"1"},{"line":"91","hit":"1"},{"line":"92","hit":"2"},{"line":"93","hit":"1"},{"line":"98","hit":"1"},{"line":"99","hit":"2"},{"line":"101","hit":"1"},{"line":"102","hit":"1"},{"line":"104","hit":"6"},{"line":"109","hit":"2"},{"line":"112","hit":"1"},{"line":"115","hit":"2"},{"line":"116","hit":"7"},{"line":"117","hit":"1"},{"line":"118","hit":"5"},{"line":"119","hit":"1"},{"line":"121","hit":"1"},{"line":"123","hit":"4"},{"line":"125","hit":"2"},{"line":"126","hit":"2"},{"line":"127","hit":"1"},{"line":"128","hit":"1"},{"line":"129","hit":"5"},{"line":"131","hit":"3"},{"line":"134","hit":"2"},{"line":"135","hit":"1"},{"line":"136","hit":"5"},{"line":"138","hit":"3"},{"line":"143","hit":"1"},{"line":"147","hit":"1"},{"line":"151","hit":"1"},{"line":"152","hit":"1"},{"line":"154","hit":"3"},{"line":"157","hit":"1"},{"line":"159","hit":"4"},{"line":"161","hit":"2"},{"line":"162","hit":"1"},{"line":"163","hit":"5"},{"line":"165","hit":"3"},{"line":"169","hit":"1"},{"line":"172","hit":"1"},{"line":"174","hit":"1"},{"line":"176","hit":"3"},{"line":"177","hit":"4"},{"line":"181","hit":"4"},{"line":"184","hit":"2"},{"line":"185","hit":"2"},{"line":"186","hit":"1"},{"line":"191","hit":"3"},{"line":"192","hit":"2"},{"line":"193","hit":"2"},{"line":"194","hit":"4"},{"line":"196","hit":"2"},{"line":"199","hit":"4"},{"line":"201","hit":"1"},{"line":"202","hit":"6"},{"line":"207","hit":"2"},{"line":"209","hit":"2"},{"line":"211","hit":"1"},{"line":"212","hit":"7"},{"line":"214","hit":"5"},{"line":"216","hit":"7"},{"line":"217","hit":"1"},{"line":"223","hit":"1"},{"line":"226","hit":"3"},{"line":"227","hit":"1"},{"line":"230","hit":"1"},{"line":"231","hit":"2"},{"line":"232","hit":"1"},{"line":"235","hit":"1"},{"line":"236","hit":"1"},{"line":"237","hit":"1"},{"line":"238","hit":"1"},{"line":"240","hit":"3"},{"line":"241","hit":"2"},{"line":"242","hit":"1"},{"line":"245","hit":"1"},{"line":"247","hit":"2"},{"line":"249","hit":"1"},{"line":"250","hit":"1"},{"line":"251","hit":"1"},{"line":"257","hit":"1"},{"line":"258","hit":"1"},{"line":"259","hit":"2"},{"line":"260","hit":"1"},{"line":"261","hit":"1"},{"line":"262","hit":"1"},{"line":"264","hit":"2"},{"line":"267","hit":"2"},{"line":"268","hit":"6"},{"line":"269","hit":"5"},{"line":"271","hit":"5"},{"line":"275","hit":"1"},{"line":"277","hit":"2"},{"line":"279","hit":"1"},{"line":"280","hit":"2"},{"line":"281","hit":"4"},{"line":"282","hit":"3"},{"line":"290","hit":"1"},{"line":"291","hit":"1"},{"line":"294","hit":"1"},{"line":"295","hit":"1"},{"line":"296","hit":"1"},{"line":"297","hit":"4"},{"line":"303","hit":"1"},{"line":"304","hit":"3"},{"line":"305","hit":"1"},{"line":"306","hit":"2"},{"line":"307","hit":"4"},{"line":"308","hit":"2"},{"line":"312","hit":"1"},{"line":"315","hit":"1"},{"line":"316","hit":"4"},{"line":"317","hit":"6"},{"line":"318","hit":"1"},{"line":"319","hit":"2"},{"line":"320","hit":"2"},{"line":"325","hit":"1"},{"line":"326","hit":"1"},{"line":"329","hit":"1"},{"line":"330","hit":"3"},{"line":"331","hit":"5"},{"line":"332","hit":"3"},{"line":"335","hit":"3"},{"line":"341","hit":"1"},{"line":"342","hit":"2"},{"line":"343","hit":"1"},{"line":"344","hit":"3"},{"line":"345","hit":"1"},{"line":"346","hit":"1"},{"line":"347","hit":"2"},{"line":"348","hit":"1"},{"line":"349","hit":"1"},{"line":"350","hit":"1"},{"line":"352","hit":"3"},{"line":"353","hit":"1"},{"line":"355","hit":"2"},{"line":"356","hit":"1"},{"line":"357","hit":"1"},{"line":"361","hit":"2"},{"line":"363","hit":"1"},{"line":"364","hit":"1"},{"line":"365","hit":"1"},{"line":"371","hit":"1"},{"line":"373","hit":"1"},{"line":"374","hit":"1"},{"line":"375","hit":"1"},{"line":"376","hit":"2"},{"line":"377","hit":"4"},{"line":"378","hit":"1"},{"line":"379","hit":"5"},{"line":"380","hit":"2"},{"line":"381","hit":"1"},{"line":"383","hit":"3"},{"line":"384","hit":"2"},{"line":"385","hit":"1"},{"line":"386","hit":"1"},{"line":"388","hit":"1"},{"line":"409","hit":"1"},{"line":"411","hit":"1"},{"line":"412","hit":"1"},{"line":"413","hit":"2"},{"line":"415","hit":"4"},{"line":"420","hit":"1"}]}} 2 | -------------------------------------------------------------------------------- /coverage/lcov.info: -------------------------------------------------------------------------------- 1 | SF:lib/textfield_search.dart 2 | DA:46,1 3 | DA:61,1 4 | DA:63,1 5 | DA:64,1 6 | DA:79,1 7 | DA:80,1 8 | DA:81,2 9 | DA:83,1 10 | DA:84,1 11 | DA:87,2 12 | DA:90,1 13 | DA:91,1 14 | DA:92,2 15 | DA:93,1 16 | DA:98,1 17 | DA:99,2 18 | DA:101,1 19 | DA:102,1 20 | DA:104,6 21 | DA:109,2 22 | DA:112,1 23 | DA:115,2 24 | DA:116,7 25 | DA:117,1 26 | DA:118,5 27 | DA:119,1 28 | DA:121,1 29 | DA:123,4 30 | DA:125,2 31 | DA:126,2 32 | DA:127,1 33 | DA:128,1 34 | DA:129,5 35 | DA:131,3 36 | DA:134,2 37 | DA:135,1 38 | DA:136,5 39 | DA:138,3 40 | DA:143,1 41 | DA:147,1 42 | DA:151,1 43 | DA:152,1 44 | DA:154,3 45 | DA:157,1 46 | DA:159,4 47 | DA:161,2 48 | DA:162,1 49 | DA:163,5 50 | DA:165,3 51 | DA:169,1 52 | DA:172,1 53 | DA:174,1 54 | DA:176,3 55 | DA:177,4 56 | DA:181,4 57 | DA:184,2 58 | DA:185,2 59 | DA:186,1 60 | DA:191,3 61 | DA:192,2 62 | DA:193,2 63 | DA:194,4 64 | DA:196,2 65 | DA:199,4 66 | DA:201,1 67 | DA:202,6 68 | DA:207,2 69 | DA:209,2 70 | DA:211,1 71 | DA:212,7 72 | DA:214,5 73 | DA:216,7 74 | DA:217,1 75 | DA:223,1 76 | DA:226,3 77 | DA:227,1 78 | DA:230,1 79 | DA:231,2 80 | DA:232,1 81 | DA:235,1 82 | DA:236,1 83 | DA:237,1 84 | DA:238,1 85 | DA:240,3 86 | DA:241,2 87 | DA:242,1 88 | DA:245,1 89 | DA:247,2 90 | DA:249,1 91 | DA:250,1 92 | DA:251,1 93 | DA:257,1 94 | DA:258,1 95 | DA:259,2 96 | DA:260,1 97 | DA:261,1 98 | DA:262,1 99 | DA:264,2 100 | DA:267,2 101 | DA:268,6 102 | DA:269,5 103 | DA:271,5 104 | DA:275,1 105 | DA:277,2 106 | DA:279,1 107 | DA:280,2 108 | DA:281,4 109 | DA:282,3 110 | DA:290,1 111 | DA:291,1 112 | DA:294,1 113 | DA:295,1 114 | DA:296,1 115 | DA:297,4 116 | DA:303,1 117 | DA:304,3 118 | DA:305,1 119 | DA:306,2 120 | DA:307,4 121 | DA:308,2 122 | DA:312,1 123 | DA:315,1 124 | DA:316,4 125 | DA:317,6 126 | DA:318,1 127 | DA:319,2 128 | DA:320,2 129 | DA:325,1 130 | DA:326,1 131 | DA:329,1 132 | DA:330,3 133 | DA:331,5 134 | DA:332,3 135 | DA:335,3 136 | DA:341,1 137 | DA:342,2 138 | DA:343,1 139 | DA:344,3 140 | DA:345,1 141 | DA:346,1 142 | DA:347,2 143 | DA:348,1 144 | DA:349,1 145 | DA:350,1 146 | DA:352,3 147 | DA:353,1 148 | DA:355,2 149 | DA:356,1 150 | DA:357,1 151 | DA:361,2 152 | DA:363,1 153 | DA:364,1 154 | DA:365,1 155 | DA:371,1 156 | DA:373,1 157 | DA:374,1 158 | DA:375,1 159 | DA:376,2 160 | DA:377,4 161 | DA:378,1 162 | DA:379,5 163 | DA:380,2 164 | DA:381,1 165 | DA:383,3 166 | DA:384,2 167 | DA:385,1 168 | DA:386,1 169 | DA:388,1 170 | DA:409,1 171 | DA:411,1 172 | DA:412,1 173 | DA:413,2 174 | DA:415,4 175 | DA:420,1 176 | LF:174 177 | LH:174 178 | end_of_record 179 | -------------------------------------------------------------------------------- /doc/api/__404error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | textfield_search - Dart API docs 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 28 |
29 | 30 |
31 | 32 | 35 |
textfield_search
36 | 39 |
40 | 41 |
42 | 43 | 44 |
45 |

404: Something's gone wrong :-(

46 | 47 |
48 |

You've tried to visit a page that doesn't exist. Luckily this site 49 | has other pages.

50 |

If you were looking for something specific, try searching: 51 |

54 |

55 | 56 |
57 |
58 | 59 | 78 | 79 | 81 | 82 |
83 | 84 |
85 | 86 | textfield_search 87 | 0.9.0 88 | 89 | 90 | 91 |
92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /doc/api/categories.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /doc/api/index.json: -------------------------------------------------------------------------------- 1 | [{"name":"textfield_search","qualifiedName":"textfield_search","href":"textfield_search/textfield_search-library.html","type":"library","overriddenDepth":0,"packageName":"textfield_search"},{"name":"Debouncer","qualifiedName":"textfield_search.Debouncer","href":"textfield_search/Debouncer-class.html","type":"class","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"textfield_search","type":"library"}},{"name":"Debouncer","qualifiedName":"textfield_search.Debouncer.Debouncer","href":"textfield_search/Debouncer/Debouncer.html","type":"constructor","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"Debouncer","type":"class"}},{"name":"action","qualifiedName":"textfield_search.Debouncer.action","href":"textfield_search/Debouncer/action.html","type":"property","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"Debouncer","type":"class"}},{"name":"milliseconds","qualifiedName":"textfield_search.Debouncer.milliseconds","href":"textfield_search/Debouncer/milliseconds.html","type":"property","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"Debouncer","type":"class"}},{"name":"run","qualifiedName":"textfield_search.Debouncer.run","href":"textfield_search/Debouncer/run.html","type":"method","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"Debouncer","type":"class"}},{"name":"TextFieldSearch","qualifiedName":"textfield_search.TextFieldSearch","href":"textfield_search/TextFieldSearch-class.html","type":"class","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"textfield_search","type":"library"}},{"name":"operator ==","qualifiedName":"textfield_search.TextFieldSearch.==","href":"textfield_search/TextFieldSearch/operator_equals.html","type":"method","overriddenDepth":1,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"TextFieldSearch","qualifiedName":"textfield_search.TextFieldSearch.TextFieldSearch","href":"textfield_search/TextFieldSearch/TextFieldSearch.html","type":"constructor","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"controller","qualifiedName":"textfield_search.TextFieldSearch.controller","href":"textfield_search/TextFieldSearch/controller.html","type":"property","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"createElement","qualifiedName":"textfield_search.TextFieldSearch.createElement","href":"textfield_search/TextFieldSearch/createElement.html","type":"method","overriddenDepth":1,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"createState","qualifiedName":"textfield_search.TextFieldSearch.createState","href":"textfield_search/TextFieldSearch/createState.html","type":"method","overriddenDepth":1,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"debugDescribeChildren","qualifiedName":"textfield_search.TextFieldSearch.debugDescribeChildren","href":"textfield_search/TextFieldSearch/debugDescribeChildren.html","type":"method","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"debugFillProperties","qualifiedName":"textfield_search.TextFieldSearch.debugFillProperties","href":"textfield_search/TextFieldSearch/debugFillProperties.html","type":"method","overriddenDepth":1,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"decoration","qualifiedName":"textfield_search.TextFieldSearch.decoration","href":"textfield_search/TextFieldSearch/decoration.html","type":"property","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"future","qualifiedName":"textfield_search.TextFieldSearch.future","href":"textfield_search/TextFieldSearch/future.html","type":"property","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"getSelectedValue","qualifiedName":"textfield_search.TextFieldSearch.getSelectedValue","href":"textfield_search/TextFieldSearch/getSelectedValue.html","type":"property","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"hashCode","qualifiedName":"textfield_search.TextFieldSearch.hashCode","href":"textfield_search/TextFieldSearch/hashCode.html","type":"property","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"initialList","qualifiedName":"textfield_search.TextFieldSearch.initialList","href":"textfield_search/TextFieldSearch/initialList.html","type":"property","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"key","qualifiedName":"textfield_search.TextFieldSearch.key","href":"textfield_search/TextFieldSearch/key.html","type":"property","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"label","qualifiedName":"textfield_search.TextFieldSearch.label","href":"textfield_search/TextFieldSearch/label.html","type":"property","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"minStringLength","qualifiedName":"textfield_search.TextFieldSearch.minStringLength","href":"textfield_search/TextFieldSearch/minStringLength.html","type":"property","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"textStyle","qualifiedName":"textfield_search.TextFieldSearch.textStyle","href":"textfield_search/TextFieldSearch/textStyle.html","type":"property","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"toDiagnosticsNode","qualifiedName":"textfield_search.TextFieldSearch.toDiagnosticsNode","href":"textfield_search/TextFieldSearch/toDiagnosticsNode.html","type":"method","overriddenDepth":1,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"toString","qualifiedName":"textfield_search.TextFieldSearch.toString","href":"textfield_search/TextFieldSearch/toString.html","type":"method","overriddenDepth":1,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"toStringDeep","qualifiedName":"textfield_search.TextFieldSearch.toStringDeep","href":"textfield_search/TextFieldSearch/toStringDeep.html","type":"method","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"toStringShallow","qualifiedName":"textfield_search.TextFieldSearch.toStringShallow","href":"textfield_search/TextFieldSearch/toStringShallow.html","type":"method","overriddenDepth":0,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}},{"name":"toStringShort","qualifiedName":"textfield_search.TextFieldSearch.toStringShort","href":"textfield_search/TextFieldSearch/toStringShort.html","type":"method","overriddenDepth":2,"packageName":"textfield_search","enclosedBy":{"name":"TextFieldSearch","type":"class"}}] 2 | -------------------------------------------------------------------------------- /doc/api/static-assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexrindone/flutter_textfield_search/e5412e0fcc5286de62c6c7f731b482bd892e582d/doc/api/static-assets/favicon.png -------------------------------------------------------------------------------- /doc/api/static-assets/github.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | github.com style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | color: #333; 12 | background: #f8f8f8; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #998; 18 | font-style: italic; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-subst { 24 | color: #333; 25 | font-weight: bold; 26 | } 27 | 28 | .hljs-number, 29 | .hljs-literal, 30 | .hljs-variable, 31 | .hljs-template-variable, 32 | .hljs-tag .hljs-attr { 33 | color: #008080; 34 | } 35 | 36 | .hljs-string, 37 | .hljs-doctag { 38 | color: #d14; 39 | } 40 | 41 | .hljs-title, 42 | .hljs-section, 43 | .hljs-selector-id { 44 | color: #900; 45 | font-weight: bold; 46 | } 47 | 48 | .hljs-subst { 49 | font-weight: normal; 50 | } 51 | 52 | .hljs-type, 53 | .hljs-class .hljs-title { 54 | color: #458; 55 | font-weight: bold; 56 | } 57 | 58 | .hljs-tag, 59 | .hljs-name, 60 | .hljs-attribute { 61 | color: #000080; 62 | font-weight: normal; 63 | } 64 | 65 | .hljs-regexp, 66 | .hljs-link { 67 | color: #009926; 68 | } 69 | 70 | .hljs-symbol, 71 | .hljs-bullet { 72 | color: #990073; 73 | } 74 | 75 | .hljs-built_in, 76 | .hljs-builtin-name { 77 | color: #0086b3; 78 | } 79 | 80 | .hljs-meta { 81 | color: #999; 82 | font-weight: bold; 83 | } 84 | 85 | .hljs-deletion { 86 | background: #fdd; 87 | } 88 | 89 | .hljs-addition { 90 | background: #dfd; 91 | } 92 | 93 | .hljs-emphasis { 94 | font-style: italic; 95 | } 96 | 97 | .hljs-strong { 98 | font-weight: bold; 99 | } 100 | -------------------------------------------------------------------------------- /doc/api/static-assets/play_button.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/api/static-assets/readme.md: -------------------------------------------------------------------------------- 1 | # highlight.js 2 | 3 | Generated from https://highlightjs.org/download/ on 2021-07-13 4 | 5 | **Included languages:** 6 | 7 | * bash 8 | * c 9 | * css 10 | * dart 11 | * diff 12 | * html, xml 13 | * java 14 | * javascript 15 | * json 16 | * kotlin 17 | * markdown 18 | * objective-c 19 | * plaintext 20 | * shell 21 | * swift 22 | * yaml 23 | -------------------------------------------------------------------------------- /doc/api/textfield_search/Debouncer/Debouncer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Debouncer constructor - Debouncer class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
Debouncer
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

Debouncer constructor 49 | Null safety 50 |

51 | 52 |
53 | Debouncer(
  1. {int? milliseconds}
  2. 54 |
) 55 |
56 | 57 | 58 |
59 |

Creates a Debouncer that executes a function after a certain length of time in milliseconds

60 |
61 | 62 | 63 | 64 |
65 |

Implementation

66 |
Debouncer({this.milliseconds});
67 |
68 | 69 | 70 |
71 | 72 | 116 | 117 | 119 | 120 |
121 | 122 |
123 | 124 | textfield_search 125 | 0.9.0 126 | 127 | 128 | 129 |
130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /doc/api/textfield_search/Debouncer/action.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | action property - Debouncer class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
action
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

action property 49 | Null safety 50 |

51 | 52 |
53 | VoidCallback? 54 | action 55 |
read / write
56 | 57 |
58 | 59 |
60 |

A callback function to execute

61 |
62 | 63 | 64 |
65 |

Implementation

66 |
VoidCallback? action;
 67 | 
 68 | 
69 |
70 | 71 | 72 |
73 | 74 | 118 | 119 | 121 | 122 |
123 | 124 |
125 | 126 | textfield_search 127 | 0.9.0 128 | 129 | 130 | 131 |
132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /doc/api/textfield_search/Debouncer/milliseconds.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | milliseconds property - Debouncer class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
milliseconds
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

milliseconds property 49 | Null safety 50 |

51 | 52 |
53 | int? 54 | milliseconds 55 |
final
56 | 57 |
58 | 59 |
60 |

A length of time in milliseconds used to delay a function call

61 |
62 | 63 | 64 |
65 |

Implementation

66 |
final int? milliseconds;
 67 | 
 68 | 
69 |
70 | 71 | 72 |
73 | 74 | 118 | 119 | 121 | 122 |
123 | 124 |
125 | 126 | textfield_search 127 | 0.9.0 128 | 129 | 130 | 131 |
132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /doc/api/textfield_search/Debouncer/run.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | run method - Debouncer class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
run
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

run method 49 | Null safety 50 |

51 | 52 |
53 | 54 | 55 | dynamic 56 | run(
  1. VoidCallback action
  2. 57 |
) 58 | 59 | 60 | 61 |
62 | 63 | 64 | 65 | 66 |
67 |

Implementation

68 |
run(VoidCallback action) {
 69 |   if (_timer != null) {
 70 |     _timer!.cancel();
 71 |   }
 72 |   _timer = Timer(Duration(milliseconds: milliseconds!), action);
 73 | }
74 |
75 | 76 | 77 |
78 | 79 | 123 | 124 | 126 | 127 |
128 | 129 |
130 | 131 | textfield_search 132 | 0.9.0 133 | 134 | 135 | 136 |
137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/controller.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | controller property - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
controller
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

controller property 49 | Null safety 50 |

51 | 52 |
53 | TextEditingController 54 | controller 55 |
final
56 | 57 |
58 | 59 |
60 |

A controller for an editable text field

61 |
62 | 63 | 64 |
65 |

Implementation

66 |
final TextEditingController controller;
 67 | 
 68 | 
69 |
70 | 71 | 72 |
73 | 74 | 132 | 133 | 135 | 136 |
137 | 138 |
139 | 140 | textfield_search 141 | 0.9.0 142 | 143 | 144 | 145 |
146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/createElement.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | createElement method - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
createElement
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

createElement method 49 | Null safety 50 |

51 | 52 |
53 | 54 |
55 |
    56 |
  1. @override
  2. 57 |
58 |
59 | 60 | StatefulElement 61 | createElement() 62 | 63 |
inherited
64 | 65 |
66 | 67 |
68 |

Creates a StatefulElement to manage this widget's location in the tree.

69 |

It is uncommon for subclasses to override this method.

70 |
71 | 72 | 73 | 74 |
75 |

Implementation

76 |
@override
 77 | StatefulElement createElement() => StatefulElement(this);
78 |
79 | 80 | 81 |
82 | 83 | 141 | 142 | 144 | 145 |
146 | 147 |
148 | 149 | textfield_search 150 | 0.9.0 151 | 152 | 153 | 154 |
155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/createState.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | createState method - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
createState
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

createState method 49 | Null safety 50 |

51 | 52 |
53 | 54 |
55 |
    56 |
  1. @override
  2. 57 |
58 |
59 | 60 | _TextFieldSearchState 61 | createState() 62 | 63 | 64 | 65 |
66 | 67 |
68 |

Creates the mutable state for this widget at a given location in the tree.

69 |

Subclasses should override this method to return a newly created 70 | instance of their associated State subclass:

71 |
@override
 72 | State<MyWidget> createState() => _MyWidgetState();
 73 | 
74 |

The framework can call this method multiple times over the lifetime of 75 | a StatefulWidget. For example, if the widget is inserted into the tree 76 | in multiple locations, the framework will create a separate State object 77 | for each location. Similarly, if the widget is removed from the tree and 78 | later inserted into the tree again, the framework will call createState 79 | again to create a fresh State object, simplifying the lifecycle of 80 | State objects.

81 |
82 | 83 | 84 | 85 |
86 |

Implementation

87 |
@override
 88 | _TextFieldSearchState createState() => _TextFieldSearchState();
89 |
90 | 91 | 92 |
93 | 94 | 152 | 153 | 155 | 156 |
157 | 158 |
159 | 160 | textfield_search 161 | 0.9.0 162 | 163 | 164 | 165 |
166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/debugDescribeChildren.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | debugDescribeChildren method - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
debugDescribeChildren
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

debugDescribeChildren method 49 | Null safety 50 |

51 | 52 |
53 | 54 |
55 |
    56 |
  1. @protected
  2. 57 |
58 |
59 | 60 | List<DiagnosticsNode> 61 | debugDescribeChildren() 62 | 63 |
@protected, inherited
64 | 65 |
66 | 67 |
68 |

Returns a list of DiagnosticsNode objects describing this node's 69 | children.

70 |

Children that are offstage should be added with style set to 71 | DiagnosticsTreeStyle.offstage to indicate that they are offstage.

72 |

The list must not contain any null entries. If there are explicit null 73 | children to report, consider new DiagnosticsNode.message or 74 | DiagnosticsProperty<Object> as possible DiagnosticsNode objects to 75 | provide.

76 |

Used by toStringDeep, toDiagnosticsNode and toStringShallow.

77 |

See also:

78 |
    79 |
  • RenderTable.debugDescribeChildren, which provides high quality custom 80 | descriptions for its child nodes.
  • 81 |
82 |
83 | 84 | 85 | 86 |
87 |

Implementation

88 |
@protected
 89 | List<DiagnosticsNode> debugDescribeChildren() => const <DiagnosticsNode>[];
90 |
91 | 92 | 93 |
94 | 95 | 153 | 154 | 156 | 157 |
158 | 159 |
160 | 161 | textfield_search 162 | 0.9.0 163 | 164 | 165 | 166 |
167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/decoration.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | decoration property - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
decoration
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

decoration property 49 | Null safety 50 |

51 | 52 |
53 | InputDecoration? 54 | decoration 55 |
final
56 | 57 |
58 | 59 |
60 |

Used for customizing the display of the TextField

61 |
62 | 63 | 64 |
65 |

Implementation

66 |
final InputDecoration? decoration;
 67 | 
 68 | 
69 |
70 | 71 | 72 |
73 | 74 | 132 | 133 | 135 | 136 |
137 | 138 |
139 | 140 | textfield_search 141 | 0.9.0 142 | 143 | 144 | 145 |
146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/future.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | future property - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
future
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

future property 49 | Null safety 50 |

51 | 52 |
53 | Function? 54 | future 55 |
final
56 | 57 |
58 | 59 |
60 |

An optional future or async function that should return a list of selectable elements

61 |
62 | 63 | 64 |
65 |

Implementation

66 |
final Function? future;
 67 | 
 68 | 
69 |
70 | 71 | 72 |
73 | 74 | 132 | 133 | 135 | 136 |
137 | 138 |
139 | 140 | textfield_search 141 | 0.9.0 142 | 143 | 144 | 145 |
146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/getSelectedValue.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | getSelectedValue property - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
getSelectedValue
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

getSelectedValue property 49 | Null safety 50 |

51 | 52 |
53 | Function? 54 | getSelectedValue 55 |
final
56 | 57 |
58 | 59 |
60 |

The value selected on tap of an element within the list

61 |
62 | 63 | 64 |
65 |

Implementation

66 |
final Function? getSelectedValue;
 67 | 
 68 | 
69 |
70 | 71 | 72 |
73 | 74 | 132 | 133 | 135 | 136 |
137 | 138 |
139 | 140 | textfield_search 141 | 0.9.0 142 | 143 | 144 | 145 |
146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/initialList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | initialList property - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
initialList
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

initialList property 49 | Null safety 50 |

51 | 52 |
53 | List? 54 | initialList 55 |
final
56 | 57 |
58 | 59 |
60 |

A default list of values that can be used for an initial list of elements to select from

61 |
62 | 63 | 64 |
65 |

Implementation

66 |
final List? initialList;
 67 | 
 68 | 
69 |
70 | 71 | 72 |
73 | 74 | 132 | 133 | 135 | 136 |
137 | 138 |
139 | 140 | textfield_search 141 | 0.9.0 142 | 143 | 144 | 145 |
146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/key.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | key property - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
key
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

key property 49 | Null safety 50 |

51 | 52 |
53 | Key? 54 | key 55 |
final, inherited
56 | 57 |
58 | 59 |
60 |

Controls how one widget replaces another widget in the tree.

61 |

If the runtimeType and key properties of the two widgets are 62 | operator==, respectively, then the new widget replaces the old widget by 63 | updating the underlying element (i.e., by calling Element.update with the 64 | new widget). Otherwise, the old element is removed from the tree, the new 65 | widget is inflated into an element, and the new element is inserted into the 66 | tree.

67 |

In addition, using a GlobalKey as the widget's key allows the element 68 | to be moved around the tree (changing parent) without losing state. When a 69 | new widget is found (its key and type do not match a previous widget in 70 | the same location), but there was a widget with that same global key 71 | elsewhere in the tree in the previous frame, then that widget's element is 72 | moved to the new location.

73 |

Generally, a widget that is the only child of another widget does not need 74 | an explicit key.

75 |

See also:

76 |
    77 |
  • The discussions at Key and GlobalKey.
  • 78 |
79 |
80 | 81 | 82 |
83 |

Implementation

84 |
final Key? key;
 85 | 
 86 | 
87 |
88 | 89 | 90 |
91 | 92 | 150 | 151 | 153 | 154 |
155 | 156 |
157 | 158 | textfield_search 159 | 0.9.0 160 | 161 | 162 | 163 |
164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/label.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | label property - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
label
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

label property 49 | Null safety 50 |

51 | 52 |
53 | String 54 | label 55 |
final
56 | 57 |
58 | 59 |
60 |

A string used for display of the selectable elements

61 |
62 | 63 | 64 |
65 |

Implementation

66 |
final String label;
 67 | 
 68 | 
69 |
70 | 71 | 72 |
73 | 74 | 132 | 133 | 135 | 136 |
137 | 138 |
139 | 140 | textfield_search 141 | 0.9.0 142 | 143 | 144 | 145 |
146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/minStringLength.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | minStringLength property - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
minStringLength
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

minStringLength property 49 | Null safety 50 |

51 | 52 |
53 | int 54 | minStringLength 55 |
final
56 | 57 |
58 | 59 |
60 |

The minimum length of characters to be entered into the TextField before executing a search

61 |
62 | 63 | 64 |
65 |

Implementation

66 |
final int minStringLength;
 67 | 
 68 | 
69 |
70 | 71 | 72 |
73 | 74 | 132 | 133 | 135 | 136 |
137 | 138 |
139 | 140 | textfield_search 141 | 0.9.0 142 | 143 | 144 | 145 |
146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/operator_equals.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | operator == method - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
operator ==
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

operator == method 49 | Null safety 50 |

51 | 52 |
53 | 54 |
55 |
    56 |
  1. @override
  2. 57 |
  3. @nonVirtual
  4. 58 |
59 |
60 | 61 | bool 62 | operator ==(
  1. Object other
  2. 63 |
) 64 | 65 |
@nonVirtual, inherited
66 | 67 |
68 | 69 |
70 |

The equality operator.

71 |

The default behavior for all Objects is to return true if and 72 | only if this object and other are the same object.

73 |

Override this method to specify a different equality relation on 74 | a class. The overriding method must still be an equivalence relation. 75 | That is, it must be:

76 |
    77 |
  • 78 |

    Total: It must return a boolean for all arguments. It should never throw.

    79 |
  • 80 |
  • 81 |

    Reflexive: For all objects o, o == o must be true.

    82 |
  • 83 |
  • 84 |

    Symmetric: For all objects o1 and o2, o1 == o2 and o2 == o1 must 85 | either both be true, or both be false.

    86 |
  • 87 |
  • 88 |

    Transitive: For all objects o1, o2, and o3, if o1 == o2 and 89 | o2 == o3 are true, then o1 == o3 must be true.

    90 |
  • 91 |
92 |

The method should also be consistent over time, 93 | so whether two objects are equal should only change 94 | if at least one of the objects was modified.

95 |

If a subclass overrides the equality operator, it should override 96 | the hashCode method as well to maintain consistency.

97 |
98 | 99 | 100 | 101 |
102 |

Implementation

103 |
@override
104 | @nonVirtual
105 | bool operator ==(Object other) => super == other;
106 |
107 | 108 | 109 |
110 | 111 | 169 | 170 | 172 | 173 |
174 | 175 |
176 | 177 | textfield_search 178 | 0.9.0 179 | 180 | 181 | 182 |
183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/textStyle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | textStyle property - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
textStyle
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

textStyle property 49 | Null safety 50 |

51 | 52 |
53 | TextStyle? 54 | textStyle 55 |
final
56 | 57 |
58 | 59 |
60 |

Used for customizing the style of the text within the TextField

61 |
62 | 63 | 64 |
65 |

Implementation

66 |
final TextStyle? textStyle;
 67 | 
 68 | 
69 |
70 | 71 | 72 |
73 | 74 | 132 | 133 | 135 | 136 |
137 | 138 |
139 | 140 | textfield_search 141 | 0.9.0 142 | 143 | 144 | 145 |
146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/toDiagnosticsNode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | toDiagnosticsNode method - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
toDiagnosticsNode
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

toDiagnosticsNode method 49 | Null safety 50 |

51 | 52 |
53 | 54 |
55 |
    56 |
  1. @override
  2. 57 |
58 |
59 | 60 | DiagnosticsNode 61 | toDiagnosticsNode(
  1. {String? name,
  2. 62 |
  3. DiagnosticsTreeStyle? style}
  4. 63 |
) 64 | 65 |
inherited
66 | 67 |
68 | 69 |
70 |

Returns a debug representation of the object that is used by debugging 71 | tools and by DiagnosticsNode.toStringDeep.

72 |

Leave name as null if there is not a meaningful description of the 73 | relationship between the this node and its parent.

74 |

Typically the style argument is only specified to indicate an atypical 75 | relationship between the parent and the node. For example, pass 76 | DiagnosticsTreeStyle.offstage to indicate that a node is offstage.

77 |
78 | 79 | 80 | 81 |
82 |

Implementation

83 |
@override
 84 | DiagnosticsNode toDiagnosticsNode({ String? name, DiagnosticsTreeStyle? style }) {
 85 |   return DiagnosticableTreeNode(
 86 |     name: name,
 87 |     value: this,
 88 |     style: style,
 89 |   );
 90 | }
91 |
92 | 93 | 94 |
95 | 96 | 154 | 155 | 157 | 158 |
159 | 160 |
161 | 162 | textfield_search 163 | 0.9.0 164 | 165 | 166 | 167 |
168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/toString.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | toString method - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
toString
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

toString method 49 | Null safety 50 |

51 | 52 |
53 | 54 |
55 |
    56 |
  1. @override
  2. 57 |
58 |
59 | 60 | String 61 | toString(
  1. {DiagnosticLevel minLevel = DiagnosticLevel.info}
  2. 62 |
) 63 | 64 |
inherited
65 | 66 |
67 | 68 |
69 |

A string representation of this object.

70 |

Some classes have a default textual representation, 71 | often paired with a static parse function (like int.parse). 72 | These classes will provide the textual representation as 73 | their string representation.

74 |

Other classes have no meaningful textual representation 75 | that a program will care about. 76 | Such classes will typically override toString to provide 77 | useful information when inspecting the object, 78 | mainly for debugging or logging.

79 |
80 | 81 | 82 | 83 |
84 |

Implementation

85 |
@override
 86 | String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
 87 |   String? fullString;
 88 |   assert(() {
 89 |     fullString = toDiagnosticsNode(style: DiagnosticsTreeStyle.singleLine).toString(minLevel: minLevel);
 90 |     return true;
 91 |   }());
 92 |   return fullString ?? toStringShort();
 93 | }
94 |
95 | 96 | 97 |
98 | 99 | 157 | 158 | 160 | 161 |
162 | 163 |
164 | 165 | textfield_search 166 | 0.9.0 167 | 168 | 169 | 170 |
171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/toStringDeep.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | toStringDeep method - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
toStringDeep
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

toStringDeep method 49 | Null safety 50 |

51 | 52 |
53 | 54 | 55 | String 56 | toStringDeep(
  1. {String prefixLineOne = '',
  2. 57 |
  3. String? prefixOtherLines,
  4. 58 |
  5. DiagnosticLevel minLevel = DiagnosticLevel.debug}
  6. 59 |
) 60 | 61 |
inherited
62 | 63 |
64 | 65 |
66 |

Returns a string representation of this node and its descendants.

67 |

prefixLineOne will be added to the front of the first line of the 68 | output. prefixOtherLines will be added to the front of each other line. 69 | If prefixOtherLines is null, the prefixLineOne is used for every line. 70 | By default, there is no prefix.

71 |

minLevel specifies the minimum DiagnosticLevel for properties included 72 | in the output.

73 |

The toStringDeep method takes other arguments, but those are intended 74 | for internal use when recursing to the descendants, and so can be ignored.

75 |

See also:

76 |
    77 |
  • toString, for a brief description of the object but not its children.
  • 78 |
  • toStringShallow, for a detailed description of the object but not its 79 | children.
  • 80 |
81 |
82 | 83 | 84 | 85 |
86 |

Implementation

87 |
String toStringDeep({
 88 |   String prefixLineOne = '',
 89 |   String? prefixOtherLines,
 90 |   DiagnosticLevel minLevel = DiagnosticLevel.debug,
 91 | }) {
 92 |   return toDiagnosticsNode().toStringDeep(prefixLineOne: prefixLineOne, prefixOtherLines: prefixOtherLines, minLevel: minLevel);
 93 | }
94 |
95 | 96 | 97 |
98 | 99 | 157 | 158 | 160 | 161 |
162 | 163 |
164 | 165 | textfield_search 166 | 0.9.0 167 | 168 | 169 | 170 |
171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | -------------------------------------------------------------------------------- /doc/api/textfield_search/TextFieldSearch/toStringShort.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | toStringShort method - TextFieldSearch class - textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
toStringShort
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

toStringShort method 49 | Null safety 50 |

51 | 52 |
53 | 54 |
55 |
    56 |
  1. @override
  2. 57 |
58 |
59 | 60 | String 61 | toStringShort() 62 | 63 |
inherited
64 | 65 |
66 | 67 |
68 |

A short, textual description of this widget.

69 |
70 | 71 | 72 | 73 |
74 |

Implementation

75 |
@override
 76 | String toStringShort() {
 77 |   final String type = objectRuntimeType(this, 'Widget');
 78 |   return key == null ? type : '$type-$key';
 79 | }
80 |
81 | 82 | 83 |
84 | 85 | 143 | 144 | 146 | 147 |
148 | 149 |
150 | 151 | textfield_search 152 | 0.9.0 153 | 154 | 155 | 156 |
157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /doc/api/textfield_search/textfield_search-library.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | textfield_search library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 35 |
textfield_search
36 | 39 |
40 | 41 |
42 | 43 | 44 |
45 |
46 |

textfield_search library 47 | Null safety 48 | 49 |

50 | 51 | 52 | 53 | 54 |
55 |

Classes

56 | 57 |
58 |
59 | Debouncer 60 | 61 |
62 |
63 | 64 |
65 | 66 |
67 | TextFieldSearch 68 | 69 |
70 |
71 | 72 |
73 | 74 |
75 |
76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 |
86 | 87 | 107 | 108 | 125 | 126 |
127 | 128 |
129 | 130 | textfield_search 131 | 0.9.0 132 | 133 | 134 | 135 |
136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | // EXAMPLE use case for TextFieldSearch Widget 2 | import 'package:flutter/material.dart'; 3 | import 'package:textfield_search/textfield_search.dart'; 4 | import 'dart:async'; 5 | 6 | void main() => runApp(MyApp()); 7 | 8 | class MyApp extends StatelessWidget { 9 | // This widget is the root of your application. 10 | @override 11 | Widget build(BuildContext context) { 12 | return MaterialApp( 13 | title: 'Flutter Demo', 14 | theme: ThemeData( 15 | primarySwatch: Colors.blue, 16 | ), 17 | home: MyHomePage(title: 'Flutter Demo Home Page'), 18 | ); 19 | } 20 | } 21 | 22 | class MyHomePage extends StatefulWidget { 23 | MyHomePage({Key? key, this.title = 'My Home Page'}) : super(key: key); 24 | 25 | final String title; 26 | 27 | @override 28 | _MyHomePageState createState() => _MyHomePageState(); 29 | } 30 | 31 | class _MyHomePageState extends State { 32 | final _testList = [ 33 | 'Test Item 1', 34 | 'Test Item 2', 35 | 'Test Item 3', 36 | 'Test Item 4', 37 | ]; 38 | 39 | TextEditingController myController = TextEditingController(); 40 | TextEditingController myController2 = TextEditingController(); 41 | TextEditingController myController3 = TextEditingController(); 42 | TextEditingController myController4 = TextEditingController(); 43 | 44 | @override 45 | void initState() { 46 | super.initState(); 47 | myController.addListener(_printLatestValue); 48 | myController2.addListener(_printLatestValue); 49 | myController3.addListener(_printLatestValue); 50 | myController4.addListener(_printLatestValue); 51 | } 52 | 53 | _printLatestValue() { 54 | print("text field: ${myController.text}"); 55 | print("text field: ${myController2.text}"); 56 | print("text field: ${myController3.text}"); 57 | print("text field: ${myController4.text}"); 58 | } 59 | 60 | @override 61 | void dispose() { 62 | // Clean up the controller when the widget is removed from the 63 | // widget tree. 64 | myController.dispose(); 65 | myController2.dispose(); 66 | myController3.dispose(); 67 | myController4.dispose(); 68 | super.dispose(); 69 | } 70 | 71 | // mocking a future 72 | Future fetchSimpleData() async { 73 | print("Calling future simple data..."); 74 | await Future.delayed(Duration(milliseconds: 2000)); 75 | List _list = []; 76 | // create a list from the text input of three items 77 | // to mock a list of items from an http call 78 | _list.add('Test' + ' Item 1'); 79 | _list.add('Test' + ' Item 2'); 80 | _list.add('Test' + ' Item 3'); 81 | return _list; 82 | } 83 | 84 | // mocking a future that returns List of Objects 85 | Future fetchComplexData() async { 86 | print("Calling future complex data"); 87 | await Future.delayed(Duration(milliseconds: 1000)); 88 | List _list = []; 89 | List _jsonList = [ 90 | {'label': 'Test' + ' Item 1', 'value': 30}, 91 | {'label': 'Test' + ' Item 2', 'value': 31}, 92 | {'label': 'Test' + ' Item 3', 'value': 32}, 93 | ]; 94 | // create a list from the text input of three items 95 | // to mock a list of items from an http call where 96 | // the label is what is seen in the textfield and something like an 97 | // ID is the selected value 98 | _list.add(new TestItem.fromJson(_jsonList[0])); 99 | _list.add(new TestItem.fromJson(_jsonList[1])); 100 | _list.add(new TestItem.fromJson(_jsonList[2])); 101 | return _list; 102 | } 103 | 104 | @override 105 | Widget build(BuildContext context) { 106 | return Scaffold( 107 | appBar: AppBar( 108 | // Here we take the value from the MyHomePage object that was created by 109 | // the App.build method, and use it to set our appbar title. 110 | title: Text(widget.title), 111 | ), 112 | body: Padding( 113 | padding: EdgeInsets.all(20), 114 | // Center is a layout widget. It takes a single child and positions it 115 | // in the middle of the parent. 116 | child: Form( 117 | child: ListView( 118 | children: [ 119 | SizedBox(height: 16), 120 | TextFieldSearch( 121 | label: 'Simple Future List', 122 | controller: myController2, 123 | future: () { 124 | return fetchSimpleData(); 125 | }), 126 | SizedBox(height: 16), 127 | TextFieldSearch( 128 | label: 'Complex Future List', 129 | controller: myController3, 130 | future: () { 131 | return fetchComplexData(); 132 | }, 133 | getSelectedValue: (item) { 134 | print(item); 135 | }, 136 | minStringLength: 4, 137 | ), 138 | SizedBox(height: 16), 139 | TextFieldSearch( 140 | label: 'Future List with custom scrollbar theme', 141 | controller: myController4, 142 | scrollbarDecoration: ScrollbarDecoration( 143 | controller: ScrollController(), 144 | theme: ScrollbarThemeData( 145 | radius: Radius.circular(30.0), 146 | thickness: WidgetStateProperty.all(20.0), 147 | trackColor: WidgetStateProperty.all(Colors.red))), 148 | future: () { 149 | return fetchSimpleData(); 150 | }), 151 | SizedBox(height: 16), 152 | TextFieldSearch( 153 | initialList: _testList, 154 | label: 'Simple List', 155 | controller: myController), 156 | SizedBox(height: 16), 157 | TextFormField( 158 | decoration: InputDecoration(labelText: 'Description'), 159 | ), 160 | ], 161 | ), 162 | ), 163 | ), 164 | ); 165 | } 166 | } 167 | 168 | // Mock Test Item Class 169 | class TestItem { 170 | final String label; 171 | dynamic value; 172 | 173 | TestItem({required this.label, this.value}); 174 | 175 | factory TestItem.fromJson(Map json) { 176 | return TestItem(label: json['label'], value: json['value']); 177 | } 178 | } 179 | -------------------------------------------------------------------------------- /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 | cupertino_icons: 45 | dependency: "direct main" 46 | description: 47 | name: cupertino_icons 48 | sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 49 | url: "https://pub.dev" 50 | source: hosted 51 | version: "1.0.8" 52 | fake_async: 53 | dependency: transitive 54 | description: 55 | name: fake_async 56 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" 57 | url: "https://pub.dev" 58 | source: hosted 59 | version: "1.3.1" 60 | flutter: 61 | dependency: "direct main" 62 | description: flutter 63 | source: sdk 64 | version: "0.0.0" 65 | flutter_test: 66 | dependency: "direct dev" 67 | description: flutter 68 | source: sdk 69 | version: "0.0.0" 70 | leak_tracker: 71 | dependency: transitive 72 | description: 73 | name: leak_tracker 74 | sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" 75 | url: "https://pub.dev" 76 | source: hosted 77 | version: "10.0.4" 78 | leak_tracker_flutter_testing: 79 | dependency: transitive 80 | description: 81 | name: leak_tracker_flutter_testing 82 | sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" 83 | url: "https://pub.dev" 84 | source: hosted 85 | version: "3.0.3" 86 | leak_tracker_testing: 87 | dependency: transitive 88 | description: 89 | name: leak_tracker_testing 90 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" 91 | url: "https://pub.dev" 92 | source: hosted 93 | version: "3.0.1" 94 | matcher: 95 | dependency: transitive 96 | description: 97 | name: matcher 98 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb 99 | url: "https://pub.dev" 100 | source: hosted 101 | version: "0.12.16+1" 102 | material_color_utilities: 103 | dependency: transitive 104 | description: 105 | name: material_color_utilities 106 | sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" 107 | url: "https://pub.dev" 108 | source: hosted 109 | version: "0.8.0" 110 | meta: 111 | dependency: transitive 112 | description: 113 | name: meta 114 | sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" 115 | url: "https://pub.dev" 116 | source: hosted 117 | version: "1.12.0" 118 | path: 119 | dependency: transitive 120 | description: 121 | name: path 122 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" 123 | url: "https://pub.dev" 124 | source: hosted 125 | version: "1.9.0" 126 | sky_engine: 127 | dependency: transitive 128 | description: flutter 129 | source: sdk 130 | version: "0.0.99" 131 | source_span: 132 | dependency: transitive 133 | description: 134 | name: source_span 135 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" 136 | url: "https://pub.dev" 137 | source: hosted 138 | version: "1.10.0" 139 | stack_trace: 140 | dependency: transitive 141 | description: 142 | name: stack_trace 143 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" 144 | url: "https://pub.dev" 145 | source: hosted 146 | version: "1.11.1" 147 | stream_channel: 148 | dependency: transitive 149 | description: 150 | name: stream_channel 151 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 152 | url: "https://pub.dev" 153 | source: hosted 154 | version: "2.1.2" 155 | string_scanner: 156 | dependency: transitive 157 | description: 158 | name: string_scanner 159 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" 160 | url: "https://pub.dev" 161 | source: hosted 162 | version: "1.2.0" 163 | term_glyph: 164 | dependency: transitive 165 | description: 166 | name: term_glyph 167 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 168 | url: "https://pub.dev" 169 | source: hosted 170 | version: "1.2.1" 171 | test_api: 172 | dependency: transitive 173 | description: 174 | name: test_api 175 | sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" 176 | url: "https://pub.dev" 177 | source: hosted 178 | version: "0.7.0" 179 | textfield_search: 180 | dependency: "direct main" 181 | description: 182 | path: ".." 183 | relative: true 184 | source: path 185 | version: "0.11.1" 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: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" 199 | url: "https://pub.dev" 200 | source: hosted 201 | version: "14.2.1" 202 | sdks: 203 | dart: ">=3.3.0 <4.0.0" 204 | flutter: ">=3.18.0-18.0.pre.54" 205 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: example_textfield_search 2 | description: A new Flutter application. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.12.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | textfield_search: 27 | path: ../ 28 | 29 | # The following adds the Cupertino Icons font to your application. 30 | # Use with the CupertinoIcons class for iOS style icons. 31 | cupertino_icons: ^1.0.8 32 | 33 | dev_dependencies: 34 | flutter_test: 35 | sdk: flutter 36 | 37 | # For information on the generic Dart part of this file, see the 38 | # following page: https://dart.dev/tools/pub/pubspec 39 | 40 | # The following section is specific to Flutter. 41 | flutter: 42 | 43 | # The following line ensures that the Material Icons font is 44 | # included with your application, so that you can use the icons in 45 | # the material Icons class. 46 | uses-material-design: true 47 | 48 | # To add assets to your application, add an assets section, like this: 49 | # assets: 50 | # - images/a_dot_burr.jpeg 51 | # - images/a_dot_ham.jpeg 52 | 53 | # An image asset can refer to one or more resolution-specific "variants", see 54 | # https://flutter.dev/assets-and-images/#resolution-aware. 55 | 56 | # For details regarding adding assets from package dependencies, see 57 | # https://flutter.dev/assets-and-images/#from-packages 58 | 59 | # To add custom fonts to your application, add a fonts section here, 60 | # in this "flutter" section. Each entry in this list should have a 61 | # "family" key with the font family name, and a "fonts" key with a 62 | # list giving the asset and other descriptors for the font. For 63 | # example: 64 | # fonts: 65 | # - family: Schyler 66 | # fonts: 67 | # - asset: fonts/Schyler-Regular.ttf 68 | # - asset: fonts/Schyler-Italic.ttf 69 | # style: italic 70 | # - family: Trajan Pro 71 | # fonts: 72 | # - asset: fonts/TrajanPro.ttf 73 | # - asset: fonts/TrajanPro_Bold.ttf 74 | # weight: 700 75 | # 76 | # For details regarding fonts from package dependencies, 77 | # see https://flutter.dev/custom-fonts/#from-packages 78 | -------------------------------------------------------------------------------- /flutter_textfield_search.iml: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /flutter_textfield_search_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /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 | cupertino_icons: 45 | dependency: "direct main" 46 | description: 47 | name: cupertino_icons 48 | sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 49 | url: "https://pub.dev" 50 | source: hosted 51 | version: "1.0.8" 52 | fake_async: 53 | dependency: transitive 54 | description: 55 | name: fake_async 56 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" 57 | url: "https://pub.dev" 58 | source: hosted 59 | version: "1.3.1" 60 | flutter: 61 | dependency: "direct main" 62 | description: flutter 63 | source: sdk 64 | version: "0.0.0" 65 | flutter_test: 66 | dependency: "direct dev" 67 | description: flutter 68 | source: sdk 69 | version: "0.0.0" 70 | leak_tracker: 71 | dependency: transitive 72 | description: 73 | name: leak_tracker 74 | sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" 75 | url: "https://pub.dev" 76 | source: hosted 77 | version: "10.0.4" 78 | leak_tracker_flutter_testing: 79 | dependency: transitive 80 | description: 81 | name: leak_tracker_flutter_testing 82 | sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" 83 | url: "https://pub.dev" 84 | source: hosted 85 | version: "3.0.3" 86 | leak_tracker_testing: 87 | dependency: transitive 88 | description: 89 | name: leak_tracker_testing 90 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" 91 | url: "https://pub.dev" 92 | source: hosted 93 | version: "3.0.1" 94 | lints: 95 | dependency: "direct dev" 96 | description: 97 | name: lints 98 | sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" 99 | url: "https://pub.dev" 100 | source: hosted 101 | version: "4.0.0" 102 | matcher: 103 | dependency: transitive 104 | description: 105 | name: matcher 106 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb 107 | url: "https://pub.dev" 108 | source: hosted 109 | version: "0.12.16+1" 110 | material_color_utilities: 111 | dependency: transitive 112 | description: 113 | name: material_color_utilities 114 | sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" 115 | url: "https://pub.dev" 116 | source: hosted 117 | version: "0.8.0" 118 | meta: 119 | dependency: transitive 120 | description: 121 | name: meta 122 | sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" 123 | url: "https://pub.dev" 124 | source: hosted 125 | version: "1.12.0" 126 | path: 127 | dependency: transitive 128 | description: 129 | name: path 130 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" 131 | url: "https://pub.dev" 132 | source: hosted 133 | version: "1.9.0" 134 | sky_engine: 135 | dependency: transitive 136 | description: flutter 137 | source: sdk 138 | version: "0.0.99" 139 | source_span: 140 | dependency: transitive 141 | description: 142 | name: source_span 143 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" 144 | url: "https://pub.dev" 145 | source: hosted 146 | version: "1.10.0" 147 | stack_trace: 148 | dependency: transitive 149 | description: 150 | name: stack_trace 151 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" 152 | url: "https://pub.dev" 153 | source: hosted 154 | version: "1.11.1" 155 | stream_channel: 156 | dependency: transitive 157 | description: 158 | name: stream_channel 159 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 160 | url: "https://pub.dev" 161 | source: hosted 162 | version: "2.1.2" 163 | string_scanner: 164 | dependency: transitive 165 | description: 166 | name: string_scanner 167 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" 168 | url: "https://pub.dev" 169 | source: hosted 170 | version: "1.2.0" 171 | term_glyph: 172 | dependency: transitive 173 | description: 174 | name: term_glyph 175 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 176 | url: "https://pub.dev" 177 | source: hosted 178 | version: "1.2.1" 179 | test_api: 180 | dependency: transitive 181 | description: 182 | name: test_api 183 | sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" 184 | url: "https://pub.dev" 185 | source: hosted 186 | version: "0.7.0" 187 | vector_math: 188 | dependency: transitive 189 | description: 190 | name: vector_math 191 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" 192 | url: "https://pub.dev" 193 | source: hosted 194 | version: "2.1.4" 195 | vm_service: 196 | dependency: transitive 197 | description: 198 | name: vm_service 199 | sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" 200 | url: "https://pub.dev" 201 | source: hosted 202 | version: "14.2.1" 203 | sdks: 204 | dart: ">=3.3.0 <4.0.0" 205 | flutter: ">=3.18.0-18.0.pre.54" 206 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: textfield_search 2 | description: A new Flutter package which uses a TextField to search and select it's value from a simple list. 3 | homepage: https://github.com/alexrindone/flutter_textfield_search 4 | version: 0.11.1 5 | 6 | environment: 7 | sdk: ">=2.12.0 <4.0.0" 8 | 9 | dependencies: 10 | cupertino_icons: ^1.0.8 11 | flutter: 12 | sdk: flutter 13 | 14 | dev_dependencies: 15 | flutter_test: 16 | sdk: flutter 17 | lints: ^4.0.0 18 | 19 | flutter: 20 | # The following line ensures that the Material Icons font is 21 | # included with your application, so that you can use the icons in 22 | # the material Icons class. 23 | uses-material-design: true 24 | 25 | module: 26 | androidX: true 27 | androidPackage: com.flutter_textfield_search 28 | iosBundleIdentifier: com.flutter_textfield_search 29 | -------------------------------------------------------------------------------- /test-coverage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Writing Code Coverage Summary to coverage.json file"; 3 | line_details=""; 4 | # loop through each line in lcov.info file 5 | while read -r line; do 6 | # all parts, split line into array based on colon 7 | IFS=: read -ra allparts <<< "$line" 8 | # case statement using first part of each line in file 9 | case ${allparts[0]} in 10 | "SF") 11 | # this sets the file we are covering 12 | FILE_NAME="${allparts[1]}" 13 | ;; 14 | "LF") 15 | # this sets the lines that were found 16 | lines_found="${allparts[1]}" 17 | ;; 18 | "LH") 19 | # this sets the lines that were hit 20 | lines_hit="${allparts[1]}" 21 | ;; 22 | "DA") 23 | # split the line on a comma 24 | IFS=',' read -r lined lineh <<< "${allparts[1]}" 25 | all_details='{"line":"'${lined}'","hit":"'${lineh}'"}' 26 | line_details+="${all_details}", 27 | ;; 28 | *) 29 | # default output 30 | # echo "Sorry, no line found.";; 31 | esac 32 | done <./coverage/lcov.info 33 | # set line summary which is lines hit divided by lines found, then get 34 | # percentage by multiplying by 100 35 | line_summary=$(echo "scale=2;$lines_hit/$lines_found*100" | bc); 36 | # remove the last comma from the array of line details 37 | line_details=${line_details%,}; 38 | # create a json string from all variables 39 | JSON_STRING='{"file":"'$FILE_NAME'","lines":{"coverage_summary":"'$line_summary'% ('$lines_hit' of '$lines_found' lines)","found":"'$lines_found'","hit":"'$lines_hit'","details":['$line_details']}}'; 40 | # output content to json fine 41 | echo "${JSON_STRING}" > ./coverage/coverage.json; 42 | echo "Finished Writing to File"; 43 | --------------------------------------------------------------------------------