1. 24 Jan, 2024 1 commit
  2. 22 Jan, 2024 1 commit
    • Hassan Toor's avatar
      [web] - Fix broken `TextField` in semantics mode when it's a sibling of `Navigator` (#138446) · 59e892d3
      Hassan Toor authored
      When a `TextField` is rendered before a `Navigator`, it breaks in semantics mode.  This is because the framework generates the incorrect semantics tree (excludes the TextField) and when that tree gets sent to the engine, we don't get the signal to create the corresponding `<input>` element.
      
      This happens for a few reasons:
      * `ModalBarrier` uses `BlockSemantics` to drop the semantics of routes beneath the current route in `Navigator`
      * `ModalBarrier` mistakenly recognizes the widget outside of the `Navigator` to be its sibling
      *  So we end up dropping the semantics node of the `TextField` rendered before it. 
      
      The fix is to let `Navigator` generate a semantics node so that `ModalBarrier` doesn't mistakenly think widgets outside of `Navigator` are its siblings.  
      
      `Navigator` doesn't currently do this, which causes all the nodes generated from its widget subtree to be directly attached to the parent semantics node above `Navigator` - since this is also the parent of `TextField`, it considers them siblings. 
      
      Fixes https://github.com/flutter/flutter/issues/129324
      59e892d3
  3. 12 Jan, 2024 1 commit
  4. 15 Dec, 2023 1 commit
  5. 11 Oct, 2023 1 commit
  6. 22 Aug, 2023 1 commit
    • Taha Tesser's avatar
      Fix `FlexibleSpaceBar.title` doesn't respect the leading widget (#132573) · db89df51
      Taha Tesser authored
      fixes [Long `FlexibleSpaceBar.title` doesn't respect the leading widget 
      ](https://github.com/flutter/flutter/issues/132030)
      
      ### Description
      
      - This adds `FlexibleSpaceBarSettings.hasLeading` for the `FlexibleSpaceBar`'s title to respect the leading widget.
      - Use the new `FlexibleSpaceBarSettings.hasLeading` property in the  `SliverAppBar` for its `FlexibleSpaceBar`.
      
      ### Code sample
      
      <details> 
      <summary>expand to view the code sample</summary> 
      
      ```dart
      import 'package:flutter/material.dart';
      
      void main() => runApp(const MyApp());
      
      class MyApp extends StatelessWidget {
        const MyApp({super.key});
      
        @override
        Widget build(BuildContext context) {
          return MaterialApp(
            debugShowCheckedModeBanner: false,
            theme: ThemeData(
              useMaterial3: true,
              brightness: Brightness.dark,
            ),
            home: const Example(),
          );
        }
      }
      
      class Example extends StatelessWidget {
        const Example({super.key});
      
        @override
        Widget build(BuildContext context) {
          return Scaffold(
            body: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                const Text('TargetPlatform.Android'),
                Theme(
                  data: Theme.of(context).copyWith(
                    platform: TargetPlatform.android,
                  ),
                  child: Container(
                    height: 250,
                    padding: const EdgeInsets.all(8),
                    decoration: BoxDecoration(
                      border: Border.all(
                        color: Colors.amber,
                        width: 4,
                      ),
                    ),
                    child: const AppBarLeading(
                      showLeading: true,
                      showTitle: false,
                    ),
                  ),
                ),
                const Text('TargetPlatform.iOS'),
                Theme(
                  data: Theme.of(context).copyWith(
                    platform: TargetPlatform.iOS,
                  ),
                  child: Container(
                    height: 250,
                    padding: const EdgeInsets.all(8),
                    decoration: BoxDecoration(
                      border: Border.all(
                        color: Colors.amber,
                        width: 2,
                      ),
                    ),
                    child: const AppBarLeading(
                      showLeading: true,
                      showTitle: false,
                    ),
                  ),
                ),
              ],
            ),
          );
        }
      }
      
      class AppBarLeading extends StatelessWidget {
        const AppBarLeading({
          super.key,
          required this.showLeading,
          required this.showTitle,
        });
      
        final bool showLeading;
        final bool showTitle;
      
        @override
        Widget build(BuildContext context) {
          return Scaffold(
            drawer: const Drawer(),
            body: CustomScrollView(
              slivers: [
                SliverAppBar(
                  automaticallyImplyLeading: showLeading,
                  iconTheme: const IconThemeData(
                    color: Colors.amber,
                  ),
                  title: showTitle ? const Text('AppBar') : null,
                  flexibleSpace: FlexibleSpaceBar(
                    title: Text('Title ' * 15),
                    // centerTitle: true,
                  ),
                  toolbarHeight: showTitle ? 170 : 100,
                ),
              ],
            ),
          );
        }
      }
      ``` 
      	
      </details>
      
      ### Before 
      
      ![Screenshot 2023-08-15 at 18 11 34](https://github.com/flutter/flutter/assets/48603081/4b798998-8549-43aa-b564-933ea14f494c)
      
      ### After
      
      ![Screenshot 2023-08-15 at 18 11 45](https://github.com/flutter/flutter/assets/48603081/b085a33a-db7d-40d4-8a12-ee37197b5bd4)
      db89df51
  7. 14 Aug, 2023 1 commit
  8. 10 Aug, 2023 1 commit
  9. 09 Aug, 2023 1 commit
  10. 22 Jul, 2023 1 commit
  11. 14 Jul, 2023 1 commit
  12. 28 Jun, 2023 1 commit
  13. 13 Jun, 2023 1 commit
    • Qun Cheng's avatar
      Update unit tests in material library for Material 3 (#128725) · a5f8b64e
      Qun Cheng authored
      Updates most of the unit tests in the packages/flutter/test/material folder so that they'll pass if ThemeData.useMaterial3 defaults to true.
      
      All of the tests have wired useMaterial3 to false and will need to be updated with a M3 version.
      
      related to #127064
      a5f8b64e
  14. 05 Jun, 2023 2 commits
  15. 26 May, 2023 1 commit
  16. 21 Dec, 2022 1 commit
  17. 09 Dec, 2022 1 commit
  18. 04 May, 2022 1 commit
  19. 02 May, 2022 2 commits
  20. 26 Mar, 2022 1 commit
  21. 25 Mar, 2022 2 commits
  22. 05 Nov, 2021 1 commit
  23. 03 Nov, 2021 1 commit
  24. 19 Aug, 2021 1 commit
  25. 18 Aug, 2021 2 commits
  26. 17 Aug, 2021 1 commit
  27. 28 Apr, 2021 1 commit
  28. 23 Apr, 2021 1 commit
  29. 16 Apr, 2021 1 commit
  30. 14 Apr, 2021 1 commit
  31. 04 Mar, 2021 1 commit
  32. 04 Feb, 2021 1 commit
  33. 28 Oct, 2020 1 commit
    • Greg Spencer's avatar
      Remove `nullOk` in `MediaQuery.of` (#68736) · 55289324
      Greg Spencer authored
      Adds MediaQuery.maybeOf to replace calling MediaQuery.of(context, nullOk: true), and removes the nullOk parameter. Also changes MediaQuery.of to return a non-nullable value, and removes many instances of the ! operator, reducing the possible places where a null dereference could occur.
      55289324
  34. 08 Oct, 2020 1 commit
  35. 08 Sep, 2020 1 commit
  36. 06 Aug, 2020 1 commit