forked from eatvio/eatvio_app
feat(order info): added order info screen
This commit is contained in:
@@ -34,12 +34,12 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
children: [
|
||||
if (widget.circumferencePoints.isNotEmpty)
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'${widget.circumferencePoints.last.chestCircumference}',
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.w500,
|
||||
@@ -47,29 +47,29 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
),
|
||||
if (widget.circumferencePoints.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,
|
||||
),
|
||||
),
|
||||
if (widget.circumferencePoints.length > 1)
|
||||
widget.circumferencePoints.last.chestCircumference > widget.circumferencePoints[widget.circumferencePoints.length - 2].chestCircumference
|
||||
? Icon(
|
||||
? const Icon(
|
||||
Icons.arrow_drop_up,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
)
|
||||
: Icon(
|
||||
: const Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
),
|
||||
Text(
|
||||
'${widget.circumferencePoints.last.waistCircumference}',
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.w500,
|
||||
@@ -77,29 +77,29 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
),
|
||||
if (widget.circumferencePoints.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,
|
||||
),
|
||||
),
|
||||
if (widget.circumferencePoints.length > 1)
|
||||
widget.circumferencePoints.last.waistCircumference > widget.circumferencePoints[widget.circumferencePoints.length - 2].waistCircumference
|
||||
? Icon(
|
||||
? const Icon(
|
||||
Icons.arrow_drop_up,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
)
|
||||
: Icon(
|
||||
: const Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
),
|
||||
Text(
|
||||
'${widget.circumferencePoints.last.hipCircumference}',
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.w500,
|
||||
@@ -107,22 +107,22 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
),
|
||||
if (widget.circumferencePoints.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,
|
||||
),
|
||||
),
|
||||
if (widget.circumferencePoints.length > 1)
|
||||
widget.circumferencePoints.last.hipCircumference > widget.circumferencePoints[widget.circumferencePoints.length - 2].hipCircumference
|
||||
? Icon(
|
||||
? const Icon(
|
||||
Icons.arrow_drop_up,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
)
|
||||
: Icon(
|
||||
: const Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
@@ -134,33 +134,33 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
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} см',
|
||||
axisLine: AxisLine(
|
||||
@@ -259,12 +259,12 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
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(
|
||||
@@ -280,16 +280,16 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
);
|
||||
},
|
||||
backgroundColor: appTheme.blueA400,
|
||||
shape: CircleBorder(),
|
||||
child: Icon(
|
||||
shape: const CircleBorder(),
|
||||
child: const Icon(
|
||||
Icons.add,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (widget.circumferencePoints.isEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 48),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 48),
|
||||
child: Text(
|
||||
'Добавьте Ваши замеры',
|
||||
textAlign: TextAlign.center,
|
||||
@@ -302,19 +302,19 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
}
|
||||
|
||||
List<CartesianSeries<CircumferenceModel, DateTime>> _getSplineSeries() {
|
||||
final Color seriesColor1 = Colors.red;
|
||||
const Color seriesColor1 = Colors.red;
|
||||
final Color seriesColor2 = appTheme.blueA400;
|
||||
final Color seriesColor3 = Colors.green;
|
||||
const Color seriesColor3 = Colors.green;
|
||||
|
||||
return <CartesianSeries<CircumferenceModel, DateTime>>[
|
||||
SplineAreaSeries<CircumferenceModel, DateTime>(
|
||||
markerSettings: MarkerSettings(
|
||||
markerSettings: const MarkerSettings(
|
||||
isVisible: true,
|
||||
color: seriesColor1,
|
||||
height: 8,
|
||||
width: 8,
|
||||
),
|
||||
dataLabelSettings: DataLabelSettings(
|
||||
dataLabelSettings: const DataLabelSettings(
|
||||
labelAlignment: ChartDataLabelAlignment.top,
|
||||
isVisible: true,
|
||||
),
|
||||
@@ -326,7 +326,7 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
Colors.transparent,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment(0, 0.6),
|
||||
end: const Alignment(0, 0.6),
|
||||
),
|
||||
name: 'Грудь',
|
||||
xValueMapper: (CircumferenceModel value, int index) => value.createdAt,
|
||||
@@ -339,7 +339,7 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
height: 8,
|
||||
width: 8,
|
||||
),
|
||||
dataLabelSettings: DataLabelSettings(
|
||||
dataLabelSettings: const DataLabelSettings(
|
||||
labelAlignment: ChartDataLabelAlignment.top,
|
||||
isVisible: true,
|
||||
),
|
||||
@@ -351,20 +351,20 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
Colors.transparent,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment(0, 0.6),
|
||||
end: const Alignment(0, 0.6),
|
||||
),
|
||||
name: 'Талия',
|
||||
xValueMapper: (CircumferenceModel value, int index) => value.createdAt,
|
||||
yValueMapper: (CircumferenceModel value, int index) => value.waistCircumference,
|
||||
),
|
||||
SplineAreaSeries<CircumferenceModel, DateTime>(
|
||||
markerSettings: MarkerSettings(
|
||||
markerSettings: const MarkerSettings(
|
||||
isVisible: true,
|
||||
color: seriesColor3,
|
||||
height: 8,
|
||||
width: 8,
|
||||
),
|
||||
dataLabelSettings: DataLabelSettings(
|
||||
dataLabelSettings: const DataLabelSettings(
|
||||
labelAlignment: ChartDataLabelAlignment.top,
|
||||
isVisible: true,
|
||||
),
|
||||
@@ -376,7 +376,7 @@ class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
Colors.transparent,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment(0, 0.6),
|
||||
end: const Alignment(0, 0.6),
|
||||
),
|
||||
name: 'Бёдра',
|
||||
xValueMapper: (CircumferenceModel value, int index) => value.createdAt,
|
||||
|
||||
Reference in New Issue
Block a user