Restore PixelatedElegance brand font and fix button callback error

This commit is contained in:
Leon Bösche
2026-01-11 02:20:26 +01:00
parent 35b2095544
commit 1151abab28
2 changed files with 34 additions and 22 deletions

View File

@@ -157,29 +157,36 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
builder: (context, state) {
final isLoading = state is OrganizationLoaded &&
state.isLoading;
if (isLoading) {
return Container(
padding: const EdgeInsets.symmetric(
horizontal: 24,
vertical: 14,
),
child: const SizedBox(
width: 20,
height: 20,
child: CircularProgressIndicator(
strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>(
AppTheme.accentColor,
),
),
),
);
}
return ModernGlassButton(
onPressed: isLoading
? null
: () {
final name = controller.text.trim();
if (name.isNotEmpty) {
BlocProvider.of<OrganizationBloc>(
context,
).add(CreateOrganization(name));
}
},
child: isLoading
? const SizedBox(
width: 20,
height: 20,
child: CircularProgressIndicator(
strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>(
AppTheme.accentColor,
),
),
)
: const Text('Create'),
onPressed: () {
final name = controller.text.trim();
if (name.isNotEmpty) {
BlocProvider.of<OrganizationBloc>(
context,
).add(CreateOrganization(name));
}
},
child: const Text('Create'),
);
},
),

View File

@@ -76,3 +76,8 @@ flutter:
assets:
- assets/fonts/
fonts:
- family: PixelatedElegance
fonts:
- asset: assets/fonts/pixelated-elegance/PixelatedEleganceRegular-ovyAA.ttf