Complete refactoring SFM App Source Code

This commit is contained in:
anhtunz
2024-12-15 00:59:02 +07:00
parent caa73ca43c
commit 2e27d59278
247 changed files with 18390 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
import 'package:flutter/material.dart';
import 'package:sfm_app/product/constant/image/image_constants.dart';
class SharedBackground extends StatelessWidget {
final Widget child;
const SharedBackground({super.key, required this.child});
@override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;
return Directionality(
textDirection: TextDirection.ltr,
child: Scaffold(
resizeToAvoidBottomInset: false,
body: SizedBox(
height: size.height,
width: double.infinity,
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
top: 0,
left: 0,
child: Image.asset(
ImageConstants.instance.getImage("background_top"),
width: size.width * 0.3,
),
),
Positioned(
bottom: 0,
right: 0,
child: Image.asset(
ImageConstants.instance.getImage("background_bottom"),
width: size.width * 0.4,
),
),
SafeArea(child: child)
],
),
),
),
);
}
}