mirror of
https://github.com/block/buzz.git
synced 2026-11-14 05:12:27 +00:00
## 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 | | --- | --- | |  |  | --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz>
31 lines
899 B
Dart
31 lines
899 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'agent_avatar_geometry.dart';
|
|
|
|
/// Compensates for the shared transparent padding in the Buzzy assets.
|
|
class AgentCharacterAlignment extends StatelessWidget {
|
|
const AgentCharacterAlignment({
|
|
super.key,
|
|
required this.url,
|
|
required this.child,
|
|
this.scale = 1,
|
|
});
|
|
final String url;
|
|
final Widget child;
|
|
final double scale;
|
|
@override
|
|
Widget build(BuildContext context) => FractionalTranslation(
|
|
translation: Offset(0, agentCharacterOffset(url, scale: scale)),
|
|
child: child,
|
|
);
|
|
}
|
|
|
|
/// One full-resolution cache entry shared by tray, flight, and video placeholder.
|
|
/// Layout-sized decodes would otherwise reload at every animation frame.
|
|
Widget characterPoster(String url) => Image.network(
|
|
url,
|
|
fit: BoxFit.contain,
|
|
gaplessPlayback: true,
|
|
errorBuilder: (_, _, _) => const Icon(Icons.smart_toy_outlined),
|
|
);
|