- 12 Jul, 2023 1 commit
-
-
Greg Spencer authored
## Description This adds links to examples that were not linked anywhere. ## Related Issues - Fixes #129956 ## Tests - Documentation only change
-
- 22 Jun, 2023 2 commits
-
-
Victor Ohashi authored
Similar to what was done on https://github.com/flutter/flutter/pull/127198, look for the closest navigator instead of screen size. Fixes: https://github.com/flutter/flutter/issues/128344
-
Qun Cheng authored
Fixes #126551 This PR is to add `onSubmitted` property to `SearchBar`.
-
- 09 Jun, 2023 1 commit
-
-
Pierre-Louis authored
## Description This improves defaults generation with logging, stats, and token validation. This PR includes these changes: * introduce `TokenLogger`, with a verbose mode * prints versions and tokens usage to the console * outputs `generated/used_tokens.csv`, a list of all used tokens, for use by Google * find token files in `data` automatically * hide tokens `Map` * tokens can be obtained using existing resolvers (e.g. `color`, `shape`), or directly through `getToken`. * tokens can be checked for existence with `tokenAvailable` * remove version from template, since the tokens are aggregated and multiple versions are possible (as is the case currently), it does not make sense to attribute a single version * improve documentation ## Related Issues - Fixes https://github.com/flutter/flutter/issues/122602 ## Tests - Added tests for `TokenLogger` - Regenerated tokens, no-op except version removal ## Future work A future PR should replace or remove the following invalid tokens usages <img width="578" alt="image" src="https://github.com/flutter/flutter/assets/6655696/b6f9e5a7-523f-4f72-94f9-1b0bf4cc9f00">
-
- 02 Jun, 2023 1 commit
-
-
Qun Cheng authored
Fixes #127092 This fix can solve the alignment issue in `SearchBar` but we still need to investigate the root cause for the `TextField`. The text baseline of `TextField` doesn't change when the height is less than 48 and greater than 40. The problem should be related to the `minContainerHeight` which is 48 by default but the `contentHeight` has become smaller than this min value already. Setting `isDense`/`isCollapsed` to true gives the `minContainerHeight` a smaller number which is 0.0: https://github.com/flutter/flutter/blob/ff33555b239de4c17e7149db17eb70bcf5dee215/packages/flutter/lib/src/material/input_decorator.dart#L1086 Since [`isDense`](https://github.com/flutter/flutter/blob/ff33555b239de4c17e7149db17eb70bcf5dee215/packages/flutter/lib/src/material/input_decorator.dart#L3907) is used for the case where the text field has less vertical space, I just use this property in SearchBar. https://github.com/flutter/flutter/assets/36861262/6ddc8e90-1b47-4dd5-9a57-59b86cafec6d This is a demo to show the text baseline that doesn't change when we set the text field height under 48. https://github.com/flutter/flutter/assets/36861262/ce2ee815-f1f5-493a-930e-0540a627bec8
-
- 25 May, 2023 1 commit
-
-
Qun Cheng authored
-
- 24 May, 2023 1 commit
-
-
Sun Jiao authored
-
- 22 May, 2023 1 commit
-
-
Victor Ohashi authored
This PR is to fix the position of `SearchAnchor` when used with nested navigator. This solution is based on what `DropdownButton` internally do, looking to the closest `Navigator` to proper calculate the where to render `SearchViewRoute`. Fixes: https://github.com/flutter/flutter/issues/126435 <details> <summary>Test case</summary> ```dart void main() => runApp(const NestedSearchBarApp()); class NestedSearchBarApp extends StatefulWidget { const NestedSearchBarApp({super.key}); @override State<NestedSearchBarApp> createState() => _NestedSearchBarAppState(); } class _NestedSearchBarAppState extends State<NestedSearchBarApp> { final SearchController controller = SearchController(); @override Widget build(BuildContext context) { final ThemeData themeData = ThemeData(useMaterial3: true); return MaterialApp( theme: themeData, builder: (BuildContext context, Widget? child) { return Scaffold( body: Row( children: <Widget>[ NavigationRail( selectedIndex: 1, destinations: const <NavigationRailDestination>[ NavigationRailDestination( icon: Icon(Icons.favorite_border), selectedIcon: Icon(Icons.favorite), label: Text('First'), ), NavigationRailDestination( icon: Icon(Icons.bookmark_border), selectedIcon: Icon(Icons.book), label: Text('Second'), ), ], ), const VerticalDivider(thickness: 1, width: 1), Expanded(child: child!) ], ), ); }, home: Scaffold( appBar: AppBar(title: const Text('Search Anchor Sample')), body: Column( children: <Widget>[ SearchAnchor( searchController: controller, builder: (BuildContext context, SearchController controller) { return IconButton( icon: const Icon(Icons.search), onPressed: () { controller.openView(); }, ); }, suggestionsBuilder: (BuildContext context, SearchController controller) { return List<ListTile>.generate(5, (int index) { final String item = 'item $index'; return ListTile( title: Text(item), onTap: () { setState(() { controller.closeView(item); }); }, ); }); }), Center( child: controller.text.isEmpty ? const Text('No item selected') : Text('Selected item: ${controller.value.text}'), ), ], ), ), ); } } ``` </details> <details> <summary>Before fix:</summary>  </details> <details> <summary>After fix:</summary>  </details>
-
- 18 May, 2023 1 commit
-
-
Qun Cheng authored
Fixes #126590 This PR is to clip the view content when the view size is not big enough, such as during animation. Also removes some unused properties in `_ViewContent` class: `getRect` and `viewConstraints`
-
- 20 Apr, 2023 1 commit
-
-
Qun Cheng authored
Fixes #124426 This PR is to make the search view shape clip the view content. Before: the highlight and the "i" of "item 9" are not clipped by the shape. <img width="350" alt="Screenshot 2023-04-19 at 12 09 48 PM" src="https://user-images.githubusercontent.com/36861262/233201222-468820a9-8717-4b6c-8528-8125a40fc161.png"> After: <img width="350" alt="Screenshot 2023-04-19 at 2 13 52 PM" src="https://user-images.githubusercontent.com/36861262/233201609-81f5a942-2390-4081-a9c7-c9523a7f9e72.png">
-
- 19 Apr, 2023 1 commit
-
-
Qun Cheng authored
-
- 17 Apr, 2023 1 commit
-
-
Qun Cheng authored
This PR is to: * Update API doc for `SearchBar`. * Add an example to show how to use a `SearchBar` as the builder of the `SearchAnchor`.
-
- 05 Apr, 2023 1 commit
-
-
Qun Cheng authored
-
- 28 Mar, 2023 1 commit
-
-
Qun Cheng authored
-
- 16 Mar, 2023 1 commit
-
-
Qun Cheng authored
-