Restore PixelatedElegance brand font and fix button callback error
This commit is contained in:
@@ -157,29 +157,36 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
final isLoading = state is OrganizationLoaded &&
|
final isLoading = state is OrganizationLoaded &&
|
||||||
state.isLoading;
|
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(
|
return ModernGlassButton(
|
||||||
onPressed: isLoading
|
onPressed: () {
|
||||||
? null
|
final name = controller.text.trim();
|
||||||
: () {
|
if (name.isNotEmpty) {
|
||||||
final name = controller.text.trim();
|
BlocProvider.of<OrganizationBloc>(
|
||||||
if (name.isNotEmpty) {
|
context,
|
||||||
BlocProvider.of<OrganizationBloc>(
|
).add(CreateOrganization(name));
|
||||||
context,
|
}
|
||||||
).add(CreateOrganization(name));
|
},
|
||||||
}
|
child: const Text('Create'),
|
||||||
},
|
|
||||||
child: isLoading
|
|
||||||
? const SizedBox(
|
|
||||||
width: 20,
|
|
||||||
height: 20,
|
|
||||||
child: CircularProgressIndicator(
|
|
||||||
strokeWidth: 2,
|
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(
|
|
||||||
AppTheme.accentColor,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: const Text('Create'),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -76,3 +76,8 @@ flutter:
|
|||||||
|
|
||||||
assets:
|
assets:
|
||||||
- assets/fonts/
|
- assets/fonts/
|
||||||
|
|
||||||
|
fonts:
|
||||||
|
- family: PixelatedElegance
|
||||||
|
fonts:
|
||||||
|
- asset: assets/fonts/pixelated-elegance/PixelatedEleganceRegular-ovyAA.ttf
|
||||||
|
|||||||
Reference in New Issue
Block a user