WIP
This commit is contained in:
parent
102ec7815e
commit
4e6e96c64c
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
|||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
|
||||
class MenuButtonWidget extends MenuEntry {
|
||||
const MenuButtonWidget({
|
||||
|
@ -33,96 +32,66 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
|||
onTap: () async {
|
||||
await widget.action?.call();
|
||||
},
|
||||
child: Container(
|
||||
width: 120.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color: FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
width: 0.5,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
|
||||
child: Container(
|
||||
width: 120.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color: FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Icon(
|
||||
widget.icon,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
if (widget.icon != null)
|
||||
Container(
|
||||
alignment: Alignment.topLeft,
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: Icon(
|
||||
widget.icon,
|
||||
size: 24.0,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Text(
|
||||
widget.title ?? '',
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Text(
|
||||
widget.title ?? '',
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2, // Add this line
|
||||
softWrap: false, // Add this line
|
||||
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(height: 0.0)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -60,16 +60,20 @@ class _MenuStaggeredViewComponentWidgetState
|
|||
crossAxisCount: 3,
|
||||
crossAxisSpacing: 10.0,
|
||||
mainAxisSpacing: 10.0,
|
||||
childAspectRatio: 1,
|
||||
mainAxisExtent: 100,
|
||||
),
|
||||
itemCount: widget.options.length,
|
||||
padding: const EdgeInsets.all(14),
|
||||
padding: const EdgeInsets.all(0),
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
return Container(
|
||||
height: 100,
|
||||
width: 100,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
alignment: Alignment.center,
|
||||
padding: const EdgeInsets.all(0),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderRadius: BorderRadius.circular(0),
|
||||
color: Colors.transparent,
|
||||
boxShadow: const [
|
||||
BoxShadow(
|
||||
|
|
Loading…
Reference in New Issue