forked from eatvio/eatvio_app
feat(order info): added order info screen
This commit is contained in:
@@ -38,7 +38,7 @@ class _WeightChartWidgetState extends State<WeightChartWidget> {
|
||||
children: [
|
||||
Text(
|
||||
'${widget.weightPoints.last.weight.toStringAsFixed(1)} кг',
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.w500,
|
||||
@@ -46,10 +46,10 @@ class _WeightChartWidgetState extends State<WeightChartWidget> {
|
||||
),
|
||||
if (widget.weightPoints.length == 1)
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 12),
|
||||
margin: const EdgeInsets.symmetric(horizontal: 12),
|
||||
width: 8,
|
||||
height: 8,
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.black12,
|
||||
),
|
||||
@@ -73,33 +73,33 @@ class _WeightChartWidgetState extends State<WeightChartWidget> {
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
SfCartesianChart(
|
||||
margin: EdgeInsets.symmetric(horizontal: 8),
|
||||
margin: const EdgeInsets.symmetric(horizontal: 8),
|
||||
enableAxisAnimation: true,
|
||||
plotAreaBorderWidth: 0,
|
||||
trackballBehavior: TrackballBehavior(
|
||||
enable: true,
|
||||
activationMode: ActivationMode.singleTap,
|
||||
tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
|
||||
tooltipSettings: InteractiveTooltip(),
|
||||
tooltipSettings: const InteractiveTooltip(),
|
||||
lineType: TrackballLineType.vertical,
|
||||
),
|
||||
primaryXAxis: DateTimeCategoryAxis(
|
||||
tickPosition: TickPosition.inside,
|
||||
majorTickLines: MajorTickLines(
|
||||
majorTickLines: const MajorTickLines(
|
||||
size: 0,
|
||||
),
|
||||
edgeLabelPlacement: EdgeLabelPlacement.shift,
|
||||
dateFormat: DateFormat.MMMd('ru'),
|
||||
labelStyle: TextStyle(
|
||||
labelStyle: const TextStyle(
|
||||
color: Colors.grey,
|
||||
),
|
||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withValues(alpha: 0.3)),
|
||||
majorGridLines: MajorGridLines(dashArray: const [1], color: Colors.grey.withValues(alpha: 0.3)),
|
||||
axisLine: AxisLine(
|
||||
color: Colors.grey.withValues(alpha: 0.3),
|
||||
width: 0.4,
|
||||
),
|
||||
),
|
||||
primaryYAxis: NumericAxis(
|
||||
primaryYAxis: const NumericAxis(
|
||||
isVisible: false,
|
||||
labelFormat: '{value} кг',
|
||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey),
|
||||
@@ -181,12 +181,12 @@ class _WeightChartWidgetState extends State<WeightChartWidget> {
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
child: Ink(
|
||||
width: MediaQuery.of(context).size.width - 32,
|
||||
padding: EdgeInsets.all(16),
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.blueA400,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Center(
|
||||
child: const Center(
|
||||
child: Text(
|
||||
'Сохранить',
|
||||
style: TextStyle(
|
||||
@@ -202,14 +202,14 @@ class _WeightChartWidgetState extends State<WeightChartWidget> {
|
||||
);
|
||||
},
|
||||
backgroundColor: appTheme.blueA400,
|
||||
shape: CircleBorder(),
|
||||
child: Icon(
|
||||
shape: const CircleBorder(),
|
||||
child: const Icon(
|
||||
Icons.add,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (widget.weightPoints.isEmpty) Text('Добавьте Ваш вес'),
|
||||
if (widget.weightPoints.isEmpty) const Text('Добавьте Ваш вес'),
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -225,7 +225,7 @@ class _WeightChartWidgetState extends State<WeightChartWidget> {
|
||||
height: 8,
|
||||
width: 8,
|
||||
),
|
||||
dataLabelSettings: DataLabelSettings(
|
||||
dataLabelSettings: const DataLabelSettings(
|
||||
labelAlignment: ChartDataLabelAlignment.top,
|
||||
isVisible: true,
|
||||
),
|
||||
@@ -237,7 +237,7 @@ class _WeightChartWidgetState extends State<WeightChartWidget> {
|
||||
Colors.transparent,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment(0, 0.6),
|
||||
end: const Alignment(0, 0.6),
|
||||
),
|
||||
name: 'Вес',
|
||||
xValueMapper: (WeightModel value, int index) => value.createdAt,
|
||||
|
||||
Reference in New Issue
Block a user