flutter/examples/api/test/cupertino
Victor Sanni 96d1b99211
Condense nav bar large title in landscape mode (#166956)
## Rotation demo



https://github.com/user-attachments/assets/b59d6875-dff7-4b40-9525-565dfd8a2554



### Portrait mode .automatic



https://github.com/user-attachments/assets/88f4f3a2-0f13-4c92-b601-20c20e13f7dc



### Landscape mode .automatic



https://github.com/user-attachments/assets/dd5e2373-82e3-41fc-8e83-4002ce5e848e



### Portrait mode .always



https://github.com/user-attachments/assets/623d131a-f71b-430d-b84c-0b4519919f56



### Landscape mode .always



https://github.com/user-attachments/assets/5980e8fe-a981-482d-9f77-97f9ab7495c7



Fixes [CupertinoSliverNavigationBar doesn't become compact in landscape
mode](https://github.com/flutter/flutter/issues/39254)

<details>
<summary>Sample code</summary>

```dart

import 'package:flutter/cupertino.dart';

void main() => runApp(const NavBarBlueApp());

class NavBarBlueApp extends StatelessWidget {
  const NavBarBlueApp({super.key});

  @override
  Widget build(BuildContext context) {
    return CupertinoApp(
      theme: CupertinoThemeData(),
      home: MainPage(),
    );
  }
}

class MainPage extends StatelessWidget {
  const MainPage({super.key});

  @override
  Widget build(BuildContext context) {
    return CupertinoPageScaffold(
      child: SafeArea(
        child: CustomScrollView(
          slivers: [
            CupertinoSliverNavigationBar.search(
              stretch: true,
              searchField: CupertinoSearchTextField(
                  suffixMode: OverlayVisibilityMode.always,
                  suffixIcon: Icon(
                    CupertinoIcons.mic_solid,
                  )),
              largeTitle: Text('Lists'),
              bottomMode: NavigationBarBottomMode.always,
            ),
            SliverList(
              delegate: SliverChildBuilderDelegate(
                (BuildContext context, int index) {
                  return CupertinoListTile(
                    title: Text('Entry $index'),
                  );
                },
                childCount: 20,
              ),
            ),
          ],
        ),
      ),
    );
  }
}


```

</details>
2025-05-01 04:42:56 +00:00
..
activity_indicator Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
bottom_tab_bar Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
button Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
checkbox Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
context_menu Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
date_picker Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
dialog Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
form_row Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
list_section Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
list_tile Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
nav_bar Condense nav bar large title in landscape mode (#166956) 2025-05-01 04:42:56 +00:00
page_scaffold Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
picker Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
radio Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
refresh Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
route Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
scrollbar Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
search_field Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
segmented_control Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
sheet CupertinoSheetRoute (#157568) 2025-01-10 23:01:08 +00:00
slider Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
switch Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
tab_scaffold Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
text_field Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
text_form_field_row Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00