1. 12 Jul, 2023 1 commit
  2. 22 Jun, 2023 2 commits
  3. 09 Jun, 2023 1 commit
    • Pierre-Louis's avatar
      Improve defaults generation with logging, stats, and token validation (#128244) · 66cda591
      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">
      66cda591
  4. 02 Jun, 2023 1 commit
  5. 25 May, 2023 1 commit
  6. 24 May, 2023 1 commit
  7. 22 May, 2023 1 commit
    • Victor Ohashi's avatar
      fix: Search anchor box location when used on nested navigator (#127198) · 7e3f1df3
      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>
      
      ![Screenshot 2023-05-19 at 11 55 53](https://github.com/flutter/flutter/assets/38299943/c86747e5-6716-4e87-b3fd-ce7f0f943b92)
      </details>
      
      <details>
      <summary>After fix:</summary>
      
      ![Screenshot 2023-05-19 at 11 53 30](https://github.com/flutter/flutter/assets/38299943/d790ee49-e047-485c-87f4-7254acbdddfa)
      </details>
      7e3f1df3
  8. 18 May, 2023 1 commit
    • Qun Cheng's avatar
      Clip search view content during animation (#126975) · f31dae2a
      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`
      f31dae2a
  9. 20 Apr, 2023 1 commit
  10. 19 Apr, 2023 1 commit
  11. 17 Apr, 2023 1 commit
  12. 05 Apr, 2023 1 commit
  13. 28 Mar, 2023 1 commit
  14. 16 Mar, 2023 1 commit