forked from eatvio/eatvio_app
Image added to plans. New Environment variable for storage
This commit is contained in:
@@ -9,6 +9,7 @@ import 'package:eatvio_app/widgets/app_bar/exit_button.dart';
|
||||
import 'package:eatvio_app/widgets/next_step_button.dart';
|
||||
import 'package:carousel_slider/carousel_slider.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'dart:math';
|
||||
import 'package:fl_chart/fl_chart.dart';
|
||||
|
||||
@@ -120,10 +121,8 @@ class MyProfileScreen extends StatelessWidget {
|
||||
text: "тест".toUpperCase(),
|
||||
margin: EdgeInsets.only(left: 10.h),
|
||||
onPressed: () {
|
||||
print(state.plans
|
||||
?.map((plan) => plan['image'])
|
||||
.toList()
|
||||
.runtimeType);
|
||||
print(dotenv.env['STORAGE_URL']! +
|
||||
state.plans?[0]['image']);
|
||||
});
|
||||
default:
|
||||
return Text('text',
|
||||
@@ -138,7 +137,7 @@ class MyProfileScreen extends StatelessWidget {
|
||||
context,
|
||||
state.plans?.map((plan) => plan['name']).toList(),
|
||||
state.plans?.map((plan) => plan['image']).toList(),
|
||||
state.plans?.map((plan) => plan['status']).toList(),
|
||||
state.plans?.map((plan) => plan['state']).toList(),
|
||||
),
|
||||
SizedBox(height: 5.v),
|
||||
])),
|
||||
@@ -562,7 +561,7 @@ class MyProfileScreen extends StatelessWidget {
|
||||
|
||||
/// Section Widget
|
||||
Widget _buildPlans(BuildContext context, List<dynamic>? plans,
|
||||
List<dynamic>? image_paths, List<dynamic>? statuses) {
|
||||
List<dynamic>? image_paths, List<dynamic>? states) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(left: 7.h),
|
||||
child: Container(
|
||||
@@ -604,9 +603,8 @@ class MyProfileScreen extends StatelessWidget {
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 38.h,
|
||||
bottom: 1.v),
|
||||
child: Text("plan_name",
|
||||
child: Text(plans![0],
|
||||
style: CustomTextStyles
|
||||
.titleSmallBluegray800Bold)),
|
||||
Container(
|
||||
@@ -623,20 +621,19 @@ class MyProfileScreen extends StatelessWidget {
|
||||
alignment: Alignment.center,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 12.h),
|
||||
child: CustomImageView(
|
||||
imagePath:
|
||||
ImageConstant.imgEllipse3,
|
||||
height: 25.adaptSize,
|
||||
width: 25.adaptSize,
|
||||
radius: BorderRadius.circular(
|
||||
12.h)))),
|
||||
child: Image.network(
|
||||
dotenv.env['STORAGE_URL']! +
|
||||
image_paths?[0],
|
||||
height: 25.adaptSize,
|
||||
width: 25.adaptSize,
|
||||
))),
|
||||
Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: Container(
|
||||
width: 60.h,
|
||||
margin: EdgeInsets.only(
|
||||
right: 25.h, top: 2.h),
|
||||
child: Text("plan_status",
|
||||
right: 0.h, top: 0.h),
|
||||
child: Text(states?[0],
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style:
|
||||
|
||||
Reference in New Issue
Block a user