Add application source code and update project structure
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'material_card2_widget.dart' show MaterialCard2Widget;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class MaterialCard2Model extends FlutterFlowModel<MaterialCard2Widget> {
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
@override
|
||||
void dispose() {}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
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 'material_card2_model.dart';
|
||||
export 'material_card2_model.dart';
|
||||
|
||||
class MaterialCard2Widget extends StatefulWidget {
|
||||
const MaterialCard2Widget({super.key});
|
||||
|
||||
@override
|
||||
State<MaterialCard2Widget> createState() => _MaterialCard2WidgetState();
|
||||
}
|
||||
|
||||
class _MaterialCard2WidgetState extends State<MaterialCard2Widget> {
|
||||
late MaterialCard2Model _model;
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => MaterialCard2Model());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 12.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: 530.0,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).secondaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 3.0,
|
||||
color: Color(0x33000000),
|
||||
offset: Offset(
|
||||
0.0,
|
||||
1.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
width: 1.0,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: 44.0,
|
||||
height: 44.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFEF3939),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Text(
|
||||
'AD',
|
||||
style: FlutterFlowTheme.of(context).titleMedium.override(
|
||||
fontFamily: 'Inter Tight',
|
||||
color: Colors.white,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Our Advice ',
|
||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||
fontFamily: 'Inter',
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.0, 4.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
'Pay Attention',
|
||||
style:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Inter',
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 100.0,
|
||||
height: 80.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFF4D23D),
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(12.0),
|
||||
topLeft: Radius.circular(0.0),
|
||||
topRight: Radius.circular(12.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user