Files
buzz/mobile/lib/shared/widgets/navigation_button_surface.dart
klopez4212 b4509dee8b feat(mobile): add Buzzies and refresh agent avatar picker (#8921)
## Summary

Adds Buzzies and refreshes the agent avatar picker with larger previews,
rounded option strips, and clearer category choices. Also moves Agents
above Appearance in the home menu and adds a custom agent icon.

### Related issue

None found.

### Testing

Analysis, 4,138 app tests, package tests, and 121 configured-auth tests
pass. Earlier visual build exercised on Pixel and iOS simulator, with
iPhone review; snapshots below show that build.

| Android · Pixel | iOS · simulator preview |
| --- | --- |
| ![Buzzies in the Android avatar
picker](https://github.com/user-attachments/assets/bf56120c-0128-4683-a0ad-189587a13c8d)
| ![Buzzies in the iOS avatar
picker](https://github.com/user-attachments/assets/63c692f5-822c-4490-883f-36bec8d2be15)
|

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
Co-authored-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz>
2026-11-02 17:00:12 +00:00

55 lines
1.5 KiB
Dart

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import '../theme/theme.dart';
import 'concentric_sheet_surface.dart';
/// Native iOS glass with an opaque Material capsule on other platforms.
class NavigationButtonSurface extends StatelessWidget {
const NavigationButtonSurface({
required this.child,
this.capsule = false,
super.key,
});
final Widget child;
/// Uses fully rounded ends instead of device-concentric corners.
final bool capsule;
@override
Widget build(BuildContext context) {
if (NavigationGlassGroup.maybeOf(context)) return child;
if (defaultTargetPlatform != TargetPlatform.iOS) {
return Material(
color: context.controlSurface,
shape: const StadiumBorder(),
clipBehavior: Clip.antiAlias,
child: child,
);
}
return ConcentricSheetSurface(
enabled: true,
usesGlass: true,
capsule: capsule,
providesSheetSurface: false,
padding: EdgeInsets.zero,
minimumRadius: Radii.navigationCapsule,
contentClipRadius: capsule ? 9999 : Radii.navigationCapsule,
child: child,
);
}
}
/// Uses the shared native navigation glass instead of a separate surface.
class NavigationGlassGroup extends InheritedWidget {
const NavigationGlassGroup({super.key, required super.child});
static bool maybeOf(BuildContext context) =>
context.dependOnInheritedWidgetOfExactType<NavigationGlassGroup>() !=
null;
@override
bool updateShouldNotify(NavigationGlassGroup oldWidget) => false;
}