Restore PixelatedElegance brand font and fix button callback error
This commit is contained in:
@@ -157,19 +157,14 @@ 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;
|
||||||
return ModernGlassButton(
|
|
||||||
onPressed: isLoading
|
if (isLoading) {
|
||||||
? null
|
return Container(
|
||||||
: () {
|
padding: const EdgeInsets.symmetric(
|
||||||
final name = controller.text.trim();
|
horizontal: 24,
|
||||||
if (name.isNotEmpty) {
|
vertical: 14,
|
||||||
BlocProvider.of<OrganizationBloc>(
|
),
|
||||||
context,
|
child: const SizedBox(
|
||||||
).add(CreateOrganization(name));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: isLoading
|
|
||||||
? const SizedBox(
|
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
@@ -178,8 +173,20 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
AppTheme.accentColor,
|
AppTheme.accentColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
: const Text('Create'),
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ModernGlassButton(
|
||||||
|
onPressed: () {
|
||||||
|
final name = controller.text.trim();
|
||||||
|
if (name.isNotEmpty) {
|
||||||
|
BlocProvider.of<OrganizationBloc>(
|
||||||
|
context,
|
||||||
|
).add(CreateOrganization(name));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: 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