1
This commit is contained in:
57
lib/page/home/widget/tip_widget.dart
Normal file
57
lib/page/home/widget/tip_widget.dart
Normal file
@@ -0,0 +1,57 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TipBox extends StatelessWidget {
|
||||
TipBox({super.key});
|
||||
|
||||
final List<String> tips = [
|
||||
"Ensure good lighting",
|
||||
"Keep the camera steady",
|
||||
"Fill the frame with the skin area",
|
||||
"Avoid shadows and glare",
|
||||
];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
margin: EdgeInsets.only(top: 20),
|
||||
padding: EdgeInsets.all(15),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: Theme.of(context).cardColor,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color(0xffE9E9E9),
|
||||
spreadRadius: 2,
|
||||
blurRadius: 9,
|
||||
offset: Offset(1, 2), // changes position of shadow
|
||||
),
|
||||
],
|
||||
),
|
||||
child: DefaultTextStyle(
|
||||
style: TextStyle(color: Color(0xff1A8C8C)),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Tips:",
|
||||
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||
color: Color(0xff1A8C8C),
|
||||
),
|
||||
),
|
||||
ListView.builder(
|
||||
itemExtent: 25,
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
padding: EdgeInsets.all(10),
|
||||
itemBuilder: (_, index) {
|
||||
return Text("-${tips[index]}.");
|
||||
},
|
||||
itemCount: tips.length,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user