Add application source code and update project structure
This commit is contained in:
14
Application Product/Source/source/lib/widget/box/box_model.dart
Executable file
14
Application Product/Source/source/lib/widget/box/box_model.dart
Executable file
@@ -0,0 +1,14 @@
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'box_widget.dart' show BoxWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class BoxModel extends FlutterFlowModel<BoxWidget> {
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
@override
|
||||
void dispose() {}
|
||||
}
|
||||
118
Application Product/Source/source/lib/widget/box/box_widget.dart
Executable file
118
Application Product/Source/source/lib/widget/box/box_widget.dart
Executable file
@@ -0,0 +1,118 @@
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'box_model.dart';
|
||||
export 'box_model.dart';
|
||||
|
||||
class BoxWidget extends StatefulWidget {
|
||||
const BoxWidget({super.key});
|
||||
|
||||
@override
|
||||
State<BoxWidget> createState() => _BoxWidgetState();
|
||||
}
|
||||
|
||||
class _BoxWidgetState extends State<BoxWidget> {
|
||||
late BoxModel _model;
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => BoxModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(16.0, 16.0, 16.0, 16.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).secondaryBackground,
|
||||
borderRadius: BorderRadius.circular(14.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(12.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width: 150.0,
|
||||
height: 47.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFD41818),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(12.0, 12.0, 12.0, 12.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Call doctor',
|
||||
style:
|
||||
FlutterFlowTheme.of(context).headlineSmall.override(
|
||||
fontFamily: 'Inter Tight',
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: 18.0,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 150.0,
|
||||
height: 50.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFF64C4C),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(12.0, 12.0, 12.0, 12.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Hopital',
|
||||
style:
|
||||
FlutterFlowTheme.of(context).headlineSmall.override(
|
||||
fontFamily: 'Inter Tight',
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: 18.0,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 16.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user