Add application source code and update project structure

This commit is contained in:
PhongMacbook
2025-11-05 03:20:59 +07:00
parent 95f8296211
commit b145c7844f
155 changed files with 9171 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'battery_widget.dart' show BatteryWidget;
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
class BatteryModel extends FlutterFlowModel<BatteryWidget> {
@override
void initState(BuildContext context) {}
@override
void dispose() {}
}

View File

@@ -0,0 +1,155 @@
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 'battery_model.dart';
export 'battery_model.dart';
class BatteryWidget extends StatefulWidget {
const BatteryWidget({super.key});
@override
State<BatteryWidget> createState() => _BatteryWidgetState();
}
class _BatteryWidgetState extends State<BatteryWidget> {
late BatteryModel _model;
@override
void setState(VoidCallback callback) {
super.setState(callback);
_model.onUpdate();
}
@override
void initState() {
super.initState();
_model = createModel(context, () => BatteryModel());
}
@override
void dispose() {
_model.maybeDispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Container(
width: 349.0,
height: 150.0,
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,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Battery Case',
style:
FlutterFlowTheme.of(context).headlineSmall.override(
fontFamily: 'Inter Tight',
letterSpacing: 0.0,
),
),
Text(
'PhoBroth\'s Case',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: FlutterFlowTheme.of(context).secondaryText,
letterSpacing: 0.0,
),
),
],
),
Container(
width: 60.0,
height: 60.0,
decoration: BoxDecoration(
color: Color(0x4DD23939),
borderRadius: BorderRadius.circular(30.0),
),
child: Icon(
Icons.battery_charging_full,
color: Color(0xFFDD7272),
size: 30.0,
),
),
],
),
Align(
alignment: AlignmentDirectional(-1.0, 0.0),
child: Text(
'Charge Level',
style: FlutterFlowTheme.of(context).bodyLarge.override(
fontFamily: 'Inter',
letterSpacing: 0.0,
),
),
),
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: 200.0,
height: 20.0,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).alternate,
borderRadius: BorderRadius.circular(10.0),
),
child: Container(
width: 160.0,
height: 20.0,
decoration: BoxDecoration(
color: Color(0xFFD42525),
borderRadius: BorderRadius.circular(10.0),
),
),
),
Text(
'80%',
style: FlutterFlowTheme.of(context).bodySmall.override(
fontFamily: 'Inter',
color: FlutterFlowTheme.of(context).secondaryText,
letterSpacing: 0.0,
),
),
].divide(SizedBox(width: 8.0)),
),
],
),
],
),
),
);
}
}