Add application source code and update project structure
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/flutter_flow/flutter_flow_widgets.dart';
|
||||
import 'time_count_widget.dart' show TimeCountWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class TimeCountModel extends FlutterFlowModel<TimeCountWidget> {
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
@override
|
||||
void dispose() {}
|
||||
}
|
||||
136
Application Product/Source/source/lib/widget/time_count/time_count_widget.dart
Executable file
136
Application Product/Source/source/lib/widget/time_count/time_count_widget.dart
Executable file
@@ -0,0 +1,136 @@
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/flutter_flow/flutter_flow_widgets.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'time_count_model.dart';
|
||||
export 'time_count_model.dart';
|
||||
|
||||
class TimeCountWidget extends StatefulWidget {
|
||||
const TimeCountWidget({super.key});
|
||||
|
||||
@override
|
||||
State<TimeCountWidget> createState() => _TimeCountWidgetState();
|
||||
}
|
||||
|
||||
class _TimeCountWidgetState extends State<TimeCountWidget> {
|
||||
late TimeCountModel _model;
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => TimeCountModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).secondaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color: Color(0x33000000),
|
||||
offset: Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
spreadRadius: 0.0,
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(16.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(16.0, 16.0, 16.0, 16.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'30 Minutes',
|
||||
style: FlutterFlowTheme.of(context).headlineLarge.override(
|
||||
fontFamily: 'Inter Tight',
|
||||
color: Color(0xFFEF3939),
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
Icons.access_time,
|
||||
color: Color(0xFFEF3939),
|
||||
size: 32.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Monday',
|
||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||
fontFamily: 'Inter',
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'May 15, 2023',
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Inter',
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
FFButtonWidget(
|
||||
onPressed: () {
|
||||
print('Button pressed ...');
|
||||
},
|
||||
text: 'Dangerous!',
|
||||
options: FFButtonOptions(
|
||||
width: 120.0,
|
||||
height: 40.0,
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: Color(0x63ECCC44),
|
||||
textStyle: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Open Sans',
|
||||
color: Colors.black,
|
||||
fontSize: 17.0,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
elevation: 0.0,
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
].divide(SizedBox(height: 12.0)),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user