Add application source code and update project structure
This commit is contained in:
16
Application Product/Source/source/lib/widget/advice/advice_model.dart
Executable file
16
Application Product/Source/source/lib/widget/advice/advice_model.dart
Executable file
@@ -0,0 +1,16 @@
|
||||
import '/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/flutter_flow/flutter_flow_widgets.dart';
|
||||
import 'advice_widget.dart' show AdviceWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class AdviceModel extends FlutterFlowModel<AdviceWidget> {
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
@override
|
||||
void dispose() {}
|
||||
}
|
||||
241
Application Product/Source/source/lib/widget/advice/advice_widget.dart
Executable file
241
Application Product/Source/source/lib/widget/advice/advice_widget.dart
Executable file
@@ -0,0 +1,241 @@
|
||||
import '/flutter_flow/flutter_flow_icon_button.dart';
|
||||
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 'advice_model.dart';
|
||||
export 'advice_model.dart';
|
||||
|
||||
class AdviceWidget extends StatefulWidget {
|
||||
const AdviceWidget({super.key});
|
||||
|
||||
@override
|
||||
State<AdviceWidget> createState() => _AdviceWidgetState();
|
||||
}
|
||||
|
||||
class _AdviceWidgetState extends State<AdviceWidget> {
|
||||
late AdviceModel _model;
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => AdviceModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
FlutterFlowTheme.of(context).secondaryBackground
|
||||
],
|
||||
stops: [0.0, 1.0],
|
||||
begin: AlignmentDirectional(0.0, -1.0),
|
||||
end: AlignmentDirectional(0, 1.0),
|
||||
),
|
||||
borderRadius: BorderRadius.circular(16.0),
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 1.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
child: Image.asset(
|
||||
'assets/images/images.jpg',
|
||||
width: 120.0,
|
||||
height: 120.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'USING SUNSCREEN',
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.headlineSmall
|
||||
.override(
|
||||
fontFamily: 'Inter Tight',
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 8.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
'SPF requirements 50+',
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.labelLarge
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 12.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Stack(
|
||||
children: [
|
||||
FFButtonWidget(
|
||||
onPressed: () {
|
||||
print('followButton pressed ...');
|
||||
},
|
||||
text: 'Follow',
|
||||
options: FFButtonOptions(
|
||||
width: 90.0,
|
||||
height: 36.0,
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
textStyle:
|
||||
FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Inter Tight',
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.secondaryBackground,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
elevation: 2.0,
|
||||
borderSide: BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(40.0),
|
||||
),
|
||||
),
|
||||
FFButtonWidget(
|
||||
onPressed: () {
|
||||
print('following pressed ...');
|
||||
},
|
||||
text: 'Following',
|
||||
options: FFButtonOptions(
|
||||
width: 90.0,
|
||||
height: 36.0,
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color:
|
||||
FlutterFlowTheme.of(context).secondaryBackground,
|
||||
textStyle:
|
||||
FlutterFlowTheme.of(context).bodyLarge.override(
|
||||
fontFamily: 'Inter',
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
elevation: 0.0,
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
width: 2.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(40.0),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||
child: FlutterFlowIconButton(
|
||||
borderColor: Colors.transparent,
|
||||
borderRadius: 30.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 44.0,
|
||||
icon: Icon(
|
||||
Icons.notifications_none,
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
size: 24.0,
|
||||
),
|
||||
onPressed: () {
|
||||
print('IconButton pressed ...');
|
||||
},
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 0.0, 0.0),
|
||||
child: FlutterFlowIconButton(
|
||||
borderColor: Colors.transparent,
|
||||
borderRadius: 30.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 44.0,
|
||||
icon: Icon(
|
||||
Icons.settings_outlined,
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
size: 24.0,
|
||||
),
|
||||
onPressed: () {
|
||||
print('IconButton pressed ...');
|
||||
},
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 0.0, 0.0),
|
||||
child: FlutterFlowIconButton(
|
||||
borderColor: Colors.transparent,
|
||||
borderRadius: 30.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 44.0,
|
||||
icon: Icon(
|
||||
Icons.keyboard_control,
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
size: 24.0,
|
||||
),
|
||||
onPressed: () {
|
||||
print('IconButton pressed ...');
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user