forked from eatvio/eatvio_app
fix: remove sizer
This commit is contained in:
@@ -3,7 +3,6 @@ export 'package:eatvio_app/core/errors/exceptions.dart';
|
||||
export 'package:eatvio_app/core/utils/date_time_utils.dart';
|
||||
export 'package:eatvio_app/core/utils/image_constant.dart';
|
||||
export 'package:eatvio_app/core/utils/logger.dart';
|
||||
export 'package:eatvio_app/core/utils/size_utils.dart';
|
||||
export 'package:eatvio_app/data/models/selectionPopupModel/selection_popup_model.dart';
|
||||
export 'package:eatvio_app/localization/app_localization.dart';
|
||||
export 'package:eatvio_app/theme/app_decoration.dart';
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// This functions are responsible to make UI responsive across all the mobile devices.
|
||||
|
||||
MediaQueryData mediaQueryData = MediaQueryData.fromView(
|
||||
WidgetsBinding.instance.platformDispatcher.views.single,
|
||||
);
|
||||
|
||||
// These are the Viewport values of your Figma Design.
|
||||
// These are used in the code as a reference to create your UI Responsively.
|
||||
const num FIGMA_DESIGN_WIDTH = 375;
|
||||
const num FIGMA_DESIGN_HEIGHT = 812;
|
||||
const num FIGMA_DESIGN_STATUS_BAR = 0;
|
||||
|
||||
///This extension is used to set padding/margin (for the top and bottom side) & height of the screen or widget according to the Viewport height.
|
||||
extension ResponsiveExtension on num {
|
||||
///This method is used to get device viewport width.
|
||||
get _width {
|
||||
return mediaQueryData.size.width;
|
||||
}
|
||||
|
||||
///This method is used to get device viewport height.
|
||||
get _height {
|
||||
num statusBar = mediaQueryData.viewPadding.top;
|
||||
num bottomBar = mediaQueryData.viewPadding.bottom;
|
||||
num screenHeight = mediaQueryData.size.height - statusBar - bottomBar;
|
||||
return screenHeight;
|
||||
}
|
||||
|
||||
///This method is used to set padding/margin (for the left and Right side) & width of the screen or widget according to the Viewport width.
|
||||
double get h => ((this * _width) / FIGMA_DESIGN_WIDTH);
|
||||
|
||||
///This method is used to set padding/margin (for the top and bottom side) & height of the screen or widget according to the Viewport height.
|
||||
double get v => (this * _height) / (FIGMA_DESIGN_HEIGHT - FIGMA_DESIGN_STATUS_BAR);
|
||||
|
||||
///This method is used to set smallest px in image height and width
|
||||
double get adaptSize {
|
||||
var height = v;
|
||||
var width = h;
|
||||
return height < width ? height.toDoubleValue() : width.toDoubleValue();
|
||||
}
|
||||
|
||||
///This method is used to set text font size according to Viewport
|
||||
double get fSize => adaptSize;
|
||||
}
|
||||
|
||||
extension FormatExtension on double {
|
||||
/// Return a [double] value with formatted according to provided fractionDigits
|
||||
double toDoubleValue({int fractionDigits = 2}) {
|
||||
return double.parse(this.toStringAsFixed(fractionDigits));
|
||||
}
|
||||
}
|
||||
@@ -61,12 +61,12 @@ class CalendarScreen extends StatelessWidget {
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(bottom: 5.v),
|
||||
padding: EdgeInsets.only(bottom: 8),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 20.v),
|
||||
SizedBox(height: 24),
|
||||
_buildCalendarBody(context, state),
|
||||
SizedBox(height: 20.v),
|
||||
SizedBox(height: 24),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -87,7 +87,7 @@ class CalendarScreen extends StatelessWidget {
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
separatorBuilder: (context, index) {
|
||||
return SizedBox(
|
||||
height: 2.v,
|
||||
height: 4,
|
||||
);
|
||||
},
|
||||
itemCount: state.calendarList.length,
|
||||
@@ -118,7 +118,7 @@ class CalendarScreen extends StatelessWidget {
|
||||
formatDate(state.calendarList[index].date),
|
||||
style: theme.textTheme.titleMedium,
|
||||
),
|
||||
SizedBox(height: 2.v),
|
||||
SizedBox(height: 4),
|
||||
if (state.calendarList[index]
|
||||
.is_current_day_included_in_the_chosen_diet_progression)
|
||||
Container(
|
||||
@@ -185,7 +185,7 @@ class CalendarScreen extends StatelessWidget {
|
||||
formatDate(state.calendarList[index].date),
|
||||
style: theme.textTheme.titleMedium,
|
||||
),
|
||||
SizedBox(height: 2.v),
|
||||
SizedBox(height: 4),
|
||||
Row(children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(
|
||||
|
||||
@@ -73,7 +73,7 @@ class DiaryRecommendationsScreen extends StatelessWidget {
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(bottom: 5.v),
|
||||
padding: EdgeInsets.only(bottom: 9),
|
||||
child: Column(
|
||||
children: [
|
||||
Scaffold(
|
||||
|
||||
@@ -84,19 +84,19 @@ class DiaryScreen extends StatelessWidget {
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(bottom: 5.v),
|
||||
padding: EdgeInsets.only(bottom: 8),
|
||||
child: Column(
|
||||
children: [
|
||||
_buildHeaderRow(context, state),
|
||||
SizedBox(height: 8.v),
|
||||
SizedBox(height: 8),
|
||||
_buildWakupRetire(context, state),
|
||||
SizedBox(height: 8.v),
|
||||
SizedBox(height: 8),
|
||||
_buildMeal(context, state),
|
||||
SizedBox(height: 8.v),
|
||||
SizedBox(height: 8),
|
||||
_buildMood(context, state),
|
||||
SizedBox(height: 8.v),
|
||||
SizedBox(height: 8),
|
||||
_buildNutritionChart(context, state),
|
||||
SizedBox(height: 8.v),
|
||||
SizedBox(height: 8),
|
||||
// _buildComment(context, state),
|
||||
// SizedBox(height: 8.v),
|
||||
_buildEndDay(context),
|
||||
@@ -118,8 +118,8 @@ class DiaryScreen extends StatelessWidget {
|
||||
_buildNutritionChart(BuildContext context, DiaryStateLoaded state) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -176,13 +176,13 @@ class DiaryScreen extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
'${state.chartData['dailyNutritionIntake']['carbohydrates'].toStringAsFixed(1)} из ${state.chartData['dailyNutritionRecommendation']['carbohydrates'].toStringAsFixed(1)} грамм'),
|
||||
SizedBox(height: 8.v),
|
||||
SizedBox(height: 8),
|
||||
Text(
|
||||
'${state.chartData['dailyNutritionIntake']['fats'].toStringAsFixed(1)} из ${state.chartData['dailyNutritionRecommendation']['fats'].toStringAsFixed(1)} грамм'),
|
||||
SizedBox(height: 8.v),
|
||||
SizedBox(height: 8),
|
||||
Text(
|
||||
'${state.chartData['dailyNutritionIntake']['proteins'].toStringAsFixed(1)} из ${state.chartData['dailyNutritionRecommendation']['proteins'].toStringAsFixed(1)} грамм'),
|
||||
SizedBox(height: 8.v),
|
||||
SizedBox(height: 8),
|
||||
Text(
|
||||
'${state.chartData['dailyNutritionIntake']['energy'].toStringAsFixed(1)} из ${state.chartData['dailyNutritionRecommendation']['energy'].toStringAsFixed(1)} Ккал'),
|
||||
],
|
||||
@@ -228,8 +228,8 @@ class DiaryScreen extends StatelessWidget {
|
||||
final day = state.diary.id;
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -239,7 +239,7 @@ class DiaryScreen extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 1.v),
|
||||
padding: EdgeInsets.only(top: 4),
|
||||
child: Column(
|
||||
children: [
|
||||
Align(
|
||||
@@ -295,10 +295,10 @@ class DiaryScreen extends StatelessWidget {
|
||||
children: [
|
||||
if (!isLoading)
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 10.h),
|
||||
margin: EdgeInsets.symmetric(horizontal: 12),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 40.h,
|
||||
vertical: 80.v,
|
||||
horizontal: 32,
|
||||
vertical: 64,
|
||||
),
|
||||
decoration: AppDecoration.fillGray.copyWith(
|
||||
borderRadius: BorderRadiusStyle.roundedBorder5,
|
||||
@@ -309,8 +309,8 @@ class DiaryScreen extends StatelessWidget {
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 7.h,
|
||||
top: 5.v,
|
||||
left: 8,
|
||||
top: 8,
|
||||
),
|
||||
child: Text(
|
||||
"Добавить фото",
|
||||
@@ -327,10 +327,10 @@ class DiaryScreen extends StatelessWidget {
|
||||
),
|
||||
if (isLoading)
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 10.h),
|
||||
margin: EdgeInsets.symmetric(horizontal: 12),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 40.h,
|
||||
vertical: 80.v,
|
||||
horizontal: 32,
|
||||
vertical: 64,
|
||||
),
|
||||
decoration: AppDecoration.fillGray.copyWith(
|
||||
borderRadius: BorderRadiusStyle.roundedBorder5,
|
||||
@@ -366,8 +366,8 @@ class DiaryScreen extends StatelessWidget {
|
||||
FocusNode focusNodeName = FocusNode();
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -377,7 +377,7 @@ class DiaryScreen extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.h),
|
||||
padding: EdgeInsets.symmetric(horizontal: 12),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
@@ -388,7 +388,7 @@ class DiaryScreen extends StatelessWidget {
|
||||
Expanded(
|
||||
// Adding Expanded widget
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.h),
|
||||
padding: EdgeInsets.symmetric(horizontal: 12),
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: MediaQuery.of(context).size.width - 260,
|
||||
@@ -408,9 +408,9 @@ class DiaryScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.v),
|
||||
SizedBox(height: 24),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.h),
|
||||
padding: EdgeInsets.symmetric(horizontal: 12),
|
||||
child: BlocSelector<DiaryBloc, DiaryState, DiaryModel?>(
|
||||
selector: (state) {
|
||||
if (state is DiaryStateLoaded)
|
||||
@@ -422,8 +422,8 @@ class DiaryScreen extends StatelessWidget {
|
||||
return CustomDropDown(
|
||||
items: state.mealList,
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
horizontal: 10.h,
|
||||
vertical: 9.v,
|
||||
horizontal: 12,
|
||||
vertical: 12,
|
||||
),
|
||||
defaultValue: state.mealList[0],
|
||||
onChanged: changeMeal(context, state),
|
||||
@@ -431,9 +431,9 @@ class DiaryScreen extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.v),
|
||||
SizedBox(height: 24),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.h),
|
||||
padding: EdgeInsets.symmetric(horizontal: 12),
|
||||
child: RawAutocomplete<String>(
|
||||
optionsBuilder: buildOptions(_options),
|
||||
fieldViewBuilder: (
|
||||
@@ -482,25 +482,25 @@ class DiaryScreen extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.v),
|
||||
SizedBox(height: 24),
|
||||
if (state.moderationExpanded)
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.h),
|
||||
padding: EdgeInsets.symmetric(horizontal: 12),
|
||||
child: GestureDetector(
|
||||
onTap: () => openCaloriesDialog(context, state),
|
||||
child: Text("Отправить на модерацию"),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.v),
|
||||
SizedBox(height: 24),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.h),
|
||||
padding: EdgeInsets.symmetric(horizontal: 12),
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
CustomTextFormField(
|
||||
width: 150.h,
|
||||
width: 128,
|
||||
hintText: "Кол-во",
|
||||
textInputAction: TextInputAction.done,
|
||||
// focusNode: focusNodeQuantity,
|
||||
@@ -509,7 +509,7 @@ class DiaryScreen extends StatelessWidget {
|
||||
inputFormatters: <TextInputFormatter>[digitsOnly],
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 30.h),
|
||||
padding: EdgeInsets.only(left: 32),
|
||||
child: BlocSelector<DiaryBloc, DiaryState, DiaryModel?>(
|
||||
selector: (state) {
|
||||
if (state is DiaryStateLoaded) {
|
||||
@@ -530,21 +530,21 @@ class DiaryScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 24.v),
|
||||
SizedBox(height: 24),
|
||||
_buildAddProduct(context, state),
|
||||
SizedBox(height: 24.v),
|
||||
SizedBox(height: 24),
|
||||
if (!state.diary.state.has_chosen_diet) ...state.portions.map((portion) => _buildProduct(context, portion)).toList(),
|
||||
if (state.diary.state.has_chosen_diet) ...state.portions.map((portion) => _buildProductDiet(context, portion)).toList(),
|
||||
SizedBox(height: 24.v),
|
||||
SizedBox(height: 24),
|
||||
_buildCarousel(context, state),
|
||||
SizedBox(height: 24.v),
|
||||
SizedBox(height: 24),
|
||||
_buildAddPhoto(context, state),
|
||||
SizedBox(height: 24.v),
|
||||
SizedBox(height: 24),
|
||||
Text(
|
||||
"Ваша сытость после приёма пищи",
|
||||
style: CustomTextStyles.bodyMediumBlack900,
|
||||
),
|
||||
SizedBox(height: 15.v),
|
||||
SizedBox(height: 16),
|
||||
BlocBuilder<DiaryBloc, DiaryState>(
|
||||
builder: (context, state) {
|
||||
if (state is DiaryStateLoaded) {
|
||||
@@ -609,25 +609,25 @@ class DiaryScreen extends StatelessWidget {
|
||||
hintText: "Название",
|
||||
controller: state.product_nameController,
|
||||
),
|
||||
SizedBox(height: 10.v),
|
||||
SizedBox(height: 12),
|
||||
CustomTextFormField(
|
||||
hintText: "Энергетическая ценность на 100",
|
||||
keyboardType: TextInputType.number,
|
||||
controller: state.caloriesController,
|
||||
),
|
||||
SizedBox(height: 10.v),
|
||||
SizedBox(height: 12),
|
||||
CustomTextFormField(
|
||||
hintText: "Белки на 100г",
|
||||
keyboardType: TextInputType.number,
|
||||
controller: state.proteinsController,
|
||||
),
|
||||
SizedBox(height: 10.v),
|
||||
SizedBox(height: 12),
|
||||
CustomTextFormField(
|
||||
hintText: "Жиры на 100г",
|
||||
keyboardType: TextInputType.number,
|
||||
controller: state.fatsController,
|
||||
),
|
||||
SizedBox(height: 10.v),
|
||||
SizedBox(height: 12),
|
||||
CustomTextFormField(
|
||||
hintText: "Углеводы на 100г",
|
||||
keyboardType: TextInputType.number,
|
||||
@@ -743,10 +743,10 @@ class DiaryScreen extends StatelessWidget {
|
||||
|
||||
_buildProduct(BuildContext context, Portion portion) {
|
||||
return Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 10.h),
|
||||
margin: EdgeInsets.symmetric(horizontal: 12),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 8.h,
|
||||
vertical: 6.v,
|
||||
horizontal: 8,
|
||||
vertical: 8,
|
||||
),
|
||||
decoration: AppDecoration.fillGray.copyWith(
|
||||
borderRadius: BorderRadiusStyle.roundedBorder5,
|
||||
@@ -757,8 +757,8 @@ class DiaryScreen extends StatelessWidget {
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 7.h,
|
||||
top: 5.v,
|
||||
left: 8,
|
||||
top: 8,
|
||||
),
|
||||
child: Text(
|
||||
portion.product_name.length > 8 ? portion.product_name.substring(0, 8) : portion.product_name,
|
||||
@@ -767,9 +767,9 @@ class DiaryScreen extends StatelessWidget {
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 20.h,
|
||||
top: 3.v,
|
||||
bottom: 3.v,
|
||||
left: 24,
|
||||
top: 4,
|
||||
bottom: 4,
|
||||
),
|
||||
child: Text(
|
||||
portion.quantity.toString() + ' ' + portion.portion.toString().tr,
|
||||
@@ -794,12 +794,12 @@ class DiaryScreen extends StatelessWidget {
|
||||
_buildProductDiet(BuildContext context, Portion portion) {
|
||||
return Container(
|
||||
margin: EdgeInsets.symmetric(
|
||||
horizontal: 10.h,
|
||||
vertical: 4.h,
|
||||
horizontal: 12,
|
||||
vertical: 4,
|
||||
),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 8.h,
|
||||
vertical: 6.v,
|
||||
horizontal: 8,
|
||||
vertical: 8,
|
||||
),
|
||||
decoration: AppDecoration.fillGray.copyWith(
|
||||
borderRadius: BorderRadiusStyle.roundedBorder5,
|
||||
@@ -814,8 +814,8 @@ class DiaryScreen extends StatelessWidget {
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 7.h,
|
||||
top: 5.v,
|
||||
left: 8,
|
||||
top: 8,
|
||||
),
|
||||
child: Text(
|
||||
portion.product_name.length > 18 ? portion.product_name.substring(0, 18) : portion.product_name,
|
||||
@@ -825,9 +825,9 @@ class DiaryScreen extends StatelessWidget {
|
||||
Spacer(),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 20.h,
|
||||
top: 3.v,
|
||||
bottom: 3.v,
|
||||
left: 24,
|
||||
top: 4,
|
||||
bottom: 4,
|
||||
),
|
||||
child: Text(
|
||||
portion.quantity.toString() + ' ' + portion.portion.toString().tr,
|
||||
@@ -842,7 +842,7 @@ class DiaryScreen extends StatelessWidget {
|
||||
return Stack(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 10.h, vertical: 10.h),
|
||||
margin: EdgeInsets.symmetric(horizontal: 12, vertical: 12),
|
||||
decoration: AppDecoration.fillGray.copyWith(
|
||||
borderRadius: BorderRadiusStyle.roundedBorder5,
|
||||
),
|
||||
@@ -856,7 +856,7 @@ class DiaryScreen extends StatelessWidget {
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: Container(
|
||||
height: 50.h, // Высота затемненной области
|
||||
height: 64, // Высота затемненной области
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
@@ -938,8 +938,8 @@ class DiaryScreen extends StatelessWidget {
|
||||
_buildWakupRetire(BuildContext context, DiaryStateLoaded state) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -965,7 +965,7 @@ class DiaryScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(left: 16.0),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 20.v),
|
||||
SizedBox(height: 24),
|
||||
GestureDetector(
|
||||
onTap: () => _selectWakeupTime(context, state),
|
||||
child: AbsorbPointer(
|
||||
@@ -976,7 +976,7 @@ class DiaryScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.v),
|
||||
SizedBox(height: 24),
|
||||
GestureDetector(
|
||||
onTap: () => _selectRetireTime(context, state),
|
||||
child: AbsorbPointer(
|
||||
@@ -987,7 +987,7 @@ class DiaryScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.v),
|
||||
SizedBox(height: 24),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -1044,8 +1044,8 @@ class DiaryScreen extends StatelessWidget {
|
||||
_buildMood(BuildContext context, DiaryStateLoaded state) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
|
||||
@@ -385,10 +385,10 @@ class RecipeCreateScreen extends StatelessWidget {
|
||||
|
||||
_buildIngredient(Ingredient ingredient) {
|
||||
return Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 10.h),
|
||||
margin: EdgeInsets.symmetric(horizontal: 12),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 8.h,
|
||||
vertical: 6.v,
|
||||
horizontal: 8,
|
||||
vertical: 8,
|
||||
),
|
||||
decoration: AppDecoration.fillGray.copyWith(
|
||||
borderRadius: BorderRadiusStyle.roundedBorder5,
|
||||
@@ -399,8 +399,8 @@ class RecipeCreateScreen extends StatelessWidget {
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 7.h,
|
||||
top: 5.v,
|
||||
left: 8,
|
||||
top: 8,
|
||||
),
|
||||
child: Text(
|
||||
ingredient.name.length > 8 ? ingredient.name.substring(0, 8) : ingredient.name,
|
||||
@@ -409,9 +409,9 @@ class RecipeCreateScreen extends StatelessWidget {
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 20.h,
|
||||
top: 3.v,
|
||||
bottom: 3.v,
|
||||
left: 24,
|
||||
top: 4,
|
||||
bottom: 4,
|
||||
),
|
||||
child: Text(
|
||||
ingredient.portion.toString() + ' ' + ingredient.unit.toString().tr,
|
||||
|
||||
@@ -394,10 +394,10 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
|
||||
_buildIngredient(Ingredient ingredient) {
|
||||
return Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 10.h),
|
||||
margin: EdgeInsets.symmetric(horizontal: 12),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 8.h,
|
||||
vertical: 6.v,
|
||||
horizontal: 8,
|
||||
vertical: 8,
|
||||
),
|
||||
decoration: AppDecoration.fillGray.copyWith(
|
||||
borderRadius: BorderRadiusStyle.roundedBorder5,
|
||||
@@ -408,8 +408,8 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 7.h,
|
||||
top: 5.v,
|
||||
left: 8,
|
||||
top: 8,
|
||||
),
|
||||
child: Text(
|
||||
ingredient.name.length > 8 ? ingredient.name.substring(0, 8) : ingredient.name,
|
||||
@@ -418,9 +418,9 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 20.h,
|
||||
top: 3.v,
|
||||
bottom: 3.v,
|
||||
left: 24,
|
||||
top: 4,
|
||||
bottom: 4,
|
||||
),
|
||||
child: Text(
|
||||
ingredient.portion.toString() + ' ' + ingredient.unit.toString().tr,
|
||||
|
||||
@@ -84,9 +84,15 @@ class _BloodPressureScreenState extends State<BloodPressureScreen> {
|
||||
SizedBox(height: 4),
|
||||
CustomDropDown(
|
||||
icon: Container(
|
||||
margin: EdgeInsets.fromLTRB(30.h, 11.v, 13.h, 11.v),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(1.h)),
|
||||
child: CustomImageView(imagePath: ImageConstant.imgFavorite, height: 12.adaptSize, width: 12.adaptSize),
|
||||
margin: EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
child: CustomImageView(
|
||||
imagePath: ImageConstant.imgFavorite,
|
||||
height: 16,
|
||||
width: 16,
|
||||
),
|
||||
),
|
||||
hintText: "Не выбрано".tr,
|
||||
items: selectionPopupList,
|
||||
@@ -104,9 +110,15 @@ class _BloodPressureScreenState extends State<BloodPressureScreen> {
|
||||
SizedBox(height: 4),
|
||||
CustomDropDown(
|
||||
icon: Container(
|
||||
margin: EdgeInsets.fromLTRB(30.h, 11.v, 13.h, 11.v),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(1.h)),
|
||||
child: CustomImageView(imagePath: ImageConstant.imgFavorite, height: 12.adaptSize, width: 12.adaptSize),
|
||||
margin: EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
child: CustomImageView(
|
||||
imagePath: ImageConstant.imgFavorite,
|
||||
height: 16,
|
||||
width: 16,
|
||||
),
|
||||
),
|
||||
hintText: "Не выбрано".tr,
|
||||
items: selectionPopupList,
|
||||
|
||||
@@ -46,14 +46,14 @@ class DietCreateScreen extends StatelessWidget {
|
||||
decoration: AppDecoration.fillGray,
|
||||
child: ListView(
|
||||
children: [
|
||||
SizedBox(height: 30.v),
|
||||
SizedBox(height: 30),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 20.h,
|
||||
bottom: 10.h,
|
||||
left: 16,
|
||||
right: 20,
|
||||
bottom: 10,
|
||||
),
|
||||
padding: EdgeInsets.all(12.h),
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
|
||||
@@ -47,14 +47,14 @@ class DietEditScreen extends StatelessWidget {
|
||||
decoration: AppDecoration.fillGray,
|
||||
child: ListView(
|
||||
children: [
|
||||
SizedBox(height: 30.v),
|
||||
SizedBox(height: 30),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 20.h,
|
||||
bottom: 10.h,
|
||||
left: 16,
|
||||
right: 20,
|
||||
bottom: 10,
|
||||
),
|
||||
padding: EdgeInsets.all(12.h),
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
|
||||
@@ -74,20 +74,20 @@ class DietSelectScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
child: CustomAppBar(
|
||||
height: 54.v,
|
||||
leadingWidth: 28.h,
|
||||
height: 54,
|
||||
leadingWidth: 28,
|
||||
leading: AppbarLeadingImage(
|
||||
imagePath: ImageConstant.imgArrowLeft,
|
||||
margin: EdgeInsets.only(left: 16.h, top: 15.v, bottom: 15.v),
|
||||
margin: EdgeInsets.only(left: 16, top: 15, bottom: 15),
|
||||
onTap: () => GoRouter.of(context).pop(),
|
||||
),
|
||||
title: Padding(
|
||||
padding: EdgeInsets.only(left: 20.h),
|
||||
padding: EdgeInsets.only(left: 20),
|
||||
child: Row(
|
||||
children: [
|
||||
AppbarSubtitle(
|
||||
text: "Диеты",
|
||||
margin: EdgeInsets.only(left: 80.h, top: 12.v, bottom: 9.v),
|
||||
margin: EdgeInsets.only(left: 80, top: 12, bottom: 9),
|
||||
),
|
||||
Spacer(),
|
||||
Padding(
|
||||
|
||||
@@ -48,14 +48,14 @@ class DietScreen extends StatelessWidget {
|
||||
decoration: AppDecoration.fillGray,
|
||||
child: ListView(
|
||||
children: [
|
||||
SizedBox(height: 30.v),
|
||||
SizedBox(height: 30),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 20.h,
|
||||
bottom: 10.h,
|
||||
left: 16,
|
||||
right: 20,
|
||||
bottom: 10,
|
||||
),
|
||||
padding: EdgeInsets.all(12.h),
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
|
||||
@@ -50,14 +50,14 @@ class BlogPostEditScreen extends StatelessWidget {
|
||||
decoration: AppDecoration.fillGray,
|
||||
child: ListView(
|
||||
children: [
|
||||
SizedBox(height: 30.v),
|
||||
SizedBox(height: 30),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 20.h,
|
||||
bottom: 10.h,
|
||||
left: 16,
|
||||
right: 20,
|
||||
bottom: 10,
|
||||
),
|
||||
padding: EdgeInsets.all(12.h),
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
|
||||
@@ -17,11 +17,11 @@ class CommentWidget extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 20.h,
|
||||
bottom: 10.h,
|
||||
left: 16,
|
||||
right: 20,
|
||||
bottom: 10,
|
||||
),
|
||||
padding: EdgeInsets.all(12.h),
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
@@ -54,15 +54,15 @@ class CommentWidget extends StatelessWidget {
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 12.h,
|
||||
top: 2.v,
|
||||
bottom: 11.v,
|
||||
left: 12,
|
||||
top: 2,
|
||||
bottom: 11,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 227.h,
|
||||
width: 227,
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
@@ -71,7 +71,7 @@ class CommentWidget extends StatelessWidget {
|
||||
),
|
||||
Spacer(),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 6.h),
|
||||
padding: EdgeInsets.only(left: 6),
|
||||
child: Text(
|
||||
commentModelObj.dateText!,
|
||||
style: theme.textTheme.bodyMedium,
|
||||
@@ -80,7 +80,7 @@ class CommentWidget extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 6.v),
|
||||
SizedBox(height: 6),
|
||||
Text(
|
||||
commentModelObj.greetingText!,
|
||||
style: CustomTextStyles.bodyMediumBluegray800,
|
||||
@@ -91,8 +91,8 @@ class CommentWidget extends StatelessWidget {
|
||||
),
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imgSend,
|
||||
height: 30.v,
|
||||
width: 30.h,
|
||||
height: 30,
|
||||
width: 30,
|
||||
margin: EdgeInsets.only(left: 5),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -118,34 +118,34 @@ class CustomSearchView extends StatelessWidget {
|
||||
),
|
||||
prefixIconConstraints: prefixConstraints ??
|
||||
BoxConstraints(
|
||||
maxHeight: 40.v,
|
||||
maxHeight: 40,
|
||||
),
|
||||
suffixIconConstraints: suffixConstraints ??
|
||||
BoxConstraints(
|
||||
maxHeight: 40.v,
|
||||
maxHeight: 40,
|
||||
),
|
||||
isDense: true,
|
||||
contentPadding: contentPadding ??
|
||||
EdgeInsets.only(
|
||||
top: 11.v,
|
||||
right: 11.h,
|
||||
bottom: 11.v,
|
||||
top: 11,
|
||||
right: 11,
|
||||
bottom: 11,
|
||||
),
|
||||
fillColor: fillColor ?? Colors.grey[200],
|
||||
filled: filled,
|
||||
border: borderDecoration ??
|
||||
OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.h),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide.none,
|
||||
),
|
||||
enabledBorder: borderDecoration ??
|
||||
OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.h),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide.none,
|
||||
),
|
||||
focusedBorder: borderDecoration ??
|
||||
OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.h),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide.none,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -118,34 +118,34 @@ class CustomSearchView extends StatelessWidget {
|
||||
),
|
||||
prefixIconConstraints: prefixConstraints ??
|
||||
BoxConstraints(
|
||||
maxHeight: 40.v,
|
||||
maxHeight: 40,
|
||||
),
|
||||
suffixIconConstraints: suffixConstraints ??
|
||||
BoxConstraints(
|
||||
maxHeight: 40.v,
|
||||
maxHeight: 40,
|
||||
),
|
||||
isDense: true,
|
||||
contentPadding: contentPadding ??
|
||||
EdgeInsets.only(
|
||||
top: 11.v,
|
||||
right: 11.h,
|
||||
bottom: 11.v,
|
||||
top: 11,
|
||||
right: 11,
|
||||
bottom: 11,
|
||||
),
|
||||
fillColor: fillColor ?? Colors.grey[200],
|
||||
filled: filled,
|
||||
border: borderDecoration ??
|
||||
OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.h),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide.none,
|
||||
),
|
||||
enabledBorder: borderDecoration ??
|
||||
OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.h),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide.none,
|
||||
),
|
||||
focusedBorder: borderDecoration ??
|
||||
OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.h),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide.none,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -46,14 +46,14 @@ class PlanCreateScreen extends StatelessWidget {
|
||||
decoration: AppDecoration.fillGray,
|
||||
child: ListView(
|
||||
children: [
|
||||
SizedBox(height: 30.v),
|
||||
SizedBox(height: 30),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 20.h,
|
||||
bottom: 10.h,
|
||||
left: 16,
|
||||
right: 20,
|
||||
bottom: 10,
|
||||
),
|
||||
padding: EdgeInsets.all(12.h),
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
|
||||
@@ -47,14 +47,14 @@ class PlanEditScreen extends StatelessWidget {
|
||||
decoration: AppDecoration.fillGray,
|
||||
child: ListView(
|
||||
children: [
|
||||
SizedBox(height: 30.v),
|
||||
SizedBox(height: 30),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 20.h,
|
||||
bottom: 10.h,
|
||||
left: 16,
|
||||
right: 20,
|
||||
bottom: 10,
|
||||
),
|
||||
padding: EdgeInsets.all(12.h),
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
|
||||
@@ -74,20 +74,20 @@ class PlanSelectScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
child: CustomAppBar(
|
||||
height: 54.v,
|
||||
leadingWidth: 28.h,
|
||||
height: 54,
|
||||
leadingWidth: 28,
|
||||
leading: AppbarLeadingImage(
|
||||
imagePath: ImageConstant.imgArrowLeft,
|
||||
margin: EdgeInsets.only(left: 16.h, top: 15.v, bottom: 15.v),
|
||||
margin: EdgeInsets.only(left: 16, top: 15, bottom: 15),
|
||||
onTap: () => GoRouter.of(context).pop(),
|
||||
),
|
||||
title: Padding(
|
||||
padding: EdgeInsets.only(left: 20.h),
|
||||
padding: EdgeInsets.only(left: 20),
|
||||
child: Row(
|
||||
children: [
|
||||
AppbarSubtitle(
|
||||
text: "Планы",
|
||||
margin: EdgeInsets.only(left: 80.h, top: 12.v, bottom: 9.v),
|
||||
margin: EdgeInsets.only(left: 80, top: 12, bottom: 9),
|
||||
),
|
||||
Spacer(),
|
||||
Padding(
|
||||
|
||||
@@ -48,14 +48,14 @@ class PlanScreen extends StatelessWidget {
|
||||
decoration: AppDecoration.fillGray,
|
||||
child: ListView(
|
||||
children: [
|
||||
SizedBox(height: 30.v),
|
||||
SizedBox(height: 30),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 20.h,
|
||||
bottom: 10.h,
|
||||
left: 16,
|
||||
right: 20,
|
||||
bottom: 10,
|
||||
),
|
||||
padding: EdgeInsets.all(12.h),
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
|
||||
@@ -73,11 +73,11 @@ class MyProfileScreen extends StatelessWidget {
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 30.v),
|
||||
SizedBox(height: 30),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -93,11 +93,11 @@ class MyProfileScreen extends StatelessWidget {
|
||||
),
|
||||
child: _buildInfo(context, state),
|
||||
),
|
||||
SizedBox(height: 15.v),
|
||||
SizedBox(height: 15),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -113,12 +113,12 @@ class MyProfileScreen extends StatelessWidget {
|
||||
),
|
||||
child: _buildCarousel(context, state),
|
||||
),
|
||||
SizedBox(height: 15.v),
|
||||
SizedBox(height: 15),
|
||||
if (!state.plans!.isEmpty)
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -139,7 +139,7 @@ class MyProfileScreen extends StatelessWidget {
|
||||
state.plans?.map((plan) => plan['state']).toList(),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 5.v),
|
||||
SizedBox(height: 5),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -169,7 +169,7 @@ class MyProfileScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
AppbarSubtitle(text: state.user?['name'] ?? ''),
|
||||
SizedBox(height: 20.v),
|
||||
SizedBox(height: 20),
|
||||
Text(state.userDetails?['additional_info'] ?? ''),
|
||||
],
|
||||
);
|
||||
@@ -207,7 +207,7 @@ class MyProfileScreen extends StatelessWidget {
|
||||
color: appTheme.black900,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 50.v),
|
||||
SizedBox(height: 50),
|
||||
_buildChart(
|
||||
context,
|
||||
state.chartPoints?.values.map<int>((e) => e['weight']).toList().map((i) => i.toDouble()).toList() ?? [0.0, 0.0, 0.0, 0.0],
|
||||
@@ -225,7 +225,7 @@ class MyProfileScreen extends StatelessWidget {
|
||||
color: appTheme.black900,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 50.v),
|
||||
SizedBox(height: 50),
|
||||
_buildChart(
|
||||
context,
|
||||
_bodyMassIndex(
|
||||
@@ -247,7 +247,7 @@ class MyProfileScreen extends StatelessWidget {
|
||||
color: appTheme.black900,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30.v),
|
||||
SizedBox(height: 30),
|
||||
_buildCircumferenceChart(context, state.circumferences, state.chartDates),
|
||||
_buildChartLegend(),
|
||||
],
|
||||
@@ -646,22 +646,22 @@ class MyProfileScreen extends StatelessWidget {
|
||||
/// Section Widget
|
||||
_buildPlans(BuildContext context, List<dynamic>? plans, List<dynamic>? imagePaths, List<dynamic>? states) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(left: 7.h),
|
||||
padding: EdgeInsets.only(left: 7),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 15.h),
|
||||
padding: EdgeInsets.only(left: 15),
|
||||
child: Text("plans_complete".tr, style: CustomTextStyles.titleMediumBlack.copyWith(color: appTheme.black900)),
|
||||
),
|
||||
SizedBox(height: 5.v),
|
||||
SizedBox(height: 5),
|
||||
Container(
|
||||
decoration: AppDecoration.outlineBlueGray.copyWith(borderRadius: BorderRadiusStyle.roundedBorder5),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 105.v,
|
||||
width: 343.h,
|
||||
height: 105,
|
||||
width: 343,
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomCenter,
|
||||
children: [
|
||||
@@ -687,28 +687,28 @@ class MyProfileScreen extends StatelessWidget {
|
||||
break;
|
||||
}
|
||||
return SizedBox(
|
||||
height: 40.v,
|
||||
width: 343.h,
|
||||
height: 40,
|
||||
width: 343,
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomRight,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 11.v),
|
||||
padding: EdgeInsets.symmetric(horizontal: 6.h, vertical: 4.v),
|
||||
margin: EdgeInsets.only(bottom: 11),
|
||||
padding: EdgeInsets.symmetric(horizontal: 6, vertical: 4),
|
||||
decoration: AppDecoration.fillGray.copyWith(borderRadius: BorderRadiusStyle.roundedBorder5),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 1.v),
|
||||
padding: EdgeInsets.only(bottom: 1),
|
||||
child: Text(plans![i], style: CustomTextStyles.titleSmallBluegray800Bold),
|
||||
),
|
||||
Container(
|
||||
height: 19.v,
|
||||
width: 100.h,
|
||||
decoration: BoxDecoration(color: boxColor, borderRadius: BorderRadius.circular(5.h)),
|
||||
height: 19,
|
||||
width: 100,
|
||||
decoration: BoxDecoration(color: boxColor, borderRadius: BorderRadius.circular(5)),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -717,19 +717,19 @@ class MyProfileScreen extends StatelessWidget {
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 12.h),
|
||||
margin: EdgeInsets.only(bottom: 12),
|
||||
child: Image.network(
|
||||
baseUrl + '/storage/' + imagePaths?[i],
|
||||
height: 25.adaptSize,
|
||||
width: 25.adaptSize,
|
||||
height: 24,
|
||||
width: 24,
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: Container(
|
||||
width: 70.h,
|
||||
margin: EdgeInsets.only(bottom: 14.h, right: 22.h),
|
||||
width: 70,
|
||||
margin: EdgeInsets.only(bottom: 14, right: 22),
|
||||
child: Text("$state".tr, maxLines: 3, overflow: TextOverflow.ellipsis, style: theme.textTheme.titleSmall),
|
||||
),
|
||||
),
|
||||
@@ -773,10 +773,10 @@ class MyProfileScreen extends StatelessWidget {
|
||||
child: ListView(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.v),
|
||||
padding: EdgeInsets.symmetric(vertical: 5),
|
||||
child: Text("chest_circumference".tr, style: theme.textTheme.bodyLarge),
|
||||
),
|
||||
SizedBox(height: 5.v),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFormField(
|
||||
controller: state.chestCircumferenceController,
|
||||
keyboardType: TextInputType.number,
|
||||
@@ -785,10 +785,10 @@ class MyProfileScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 15.v),
|
||||
padding: EdgeInsets.symmetric(vertical: 15),
|
||||
child: Text("waist_circumference".tr, style: theme.textTheme.bodyLarge),
|
||||
),
|
||||
SizedBox(height: 5.v),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFormField(
|
||||
controller: state.waistCircumferenceController,
|
||||
keyboardType: TextInputType.number,
|
||||
@@ -797,10 +797,10 @@ class MyProfileScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 15.v),
|
||||
padding: EdgeInsets.symmetric(vertical: 15),
|
||||
child: Text("hip_circumference".tr, style: theme.textTheme.bodyLarge),
|
||||
),
|
||||
SizedBox(height: 5.v),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFormField(
|
||||
controller: state.hipCircumferenceController,
|
||||
keyboardType: TextInputType.number,
|
||||
|
||||
@@ -78,24 +78,24 @@ class MySettingsScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
child: CustomAppBar(
|
||||
height: 54.v,
|
||||
leadingWidth: 28.h,
|
||||
height: 54,
|
||||
leadingWidth: 28,
|
||||
leading: AppbarLeadingImage(
|
||||
imagePath: ImageConstant.imgArrowLeft,
|
||||
margin: EdgeInsets.only(left: 16.h, top: 15.v, bottom: 15.v),
|
||||
margin: EdgeInsets.only(left: 16, top: 15, bottom: 15),
|
||||
onTap: () => GoRouter.of(context).pop(),
|
||||
),
|
||||
title: Padding(
|
||||
padding: EdgeInsets.only(left: 20.h),
|
||||
child: Row(children: [AppbarSubtitle(text: state.user?['name'], margin: EdgeInsets.only(left: 80.h, top: 12.v, bottom: 9.v))]),
|
||||
padding: EdgeInsets.only(left: 20),
|
||||
child: Row(children: [AppbarSubtitle(text: state.user?['name'], margin: EdgeInsets.only(left: 80, top: 12, bottom: 9))]),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -119,8 +119,8 @@ class MySettingsScreen extends StatelessWidget {
|
||||
SizedBox(height: 20),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -145,8 +145,8 @@ class MySettingsScreen extends StatelessWidget {
|
||||
SizedBox(height: 20),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
|
||||
@@ -67,14 +67,14 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
child: ListView(
|
||||
children: [
|
||||
_buldAppBar(context),
|
||||
SizedBox(height: 20.v),
|
||||
SizedBox(height: 20),
|
||||
_buildRecipeInfo(state, context),
|
||||
SizedBox(height: 20.v),
|
||||
SizedBox(height: 20),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: steps,
|
||||
),
|
||||
SizedBox(height: 20.v),
|
||||
SizedBox(height: 20),
|
||||
_buildAdditional(context, state),
|
||||
],
|
||||
),
|
||||
@@ -86,7 +86,7 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
|
||||
_buldAppBar(BuildContext context) {
|
||||
return Container(
|
||||
margin: EdgeInsets.all(16.h),
|
||||
margin: EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
@@ -100,11 +100,11 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
child: CustomAppBar(
|
||||
height: 54.v,
|
||||
leadingWidth: 28.h,
|
||||
height: 54,
|
||||
leadingWidth: 28,
|
||||
leading: AppbarLeadingImage(
|
||||
imagePath: ImageConstant.imgArrowLeft,
|
||||
margin: EdgeInsets.only(left: 16.h, top: 15.v, bottom: 15.v),
|
||||
margin: EdgeInsets.only(left: 16, top: 15, bottom: 15),
|
||||
onTap: onTapBack(context),
|
||||
),
|
||||
title: Align(
|
||||
@@ -120,11 +120,11 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
_buildRecipeInfo(RecipeEditLoadedState state, BuildContext context) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 16.h,
|
||||
bottom: 10.h,
|
||||
left: 16,
|
||||
right: 16,
|
||||
bottom: 10,
|
||||
),
|
||||
padding: EdgeInsets.all(12.h),
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
@@ -161,7 +161,7 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
hintText: "Введите название рецепта",
|
||||
fillColor: appTheme.gray50,
|
||||
borderDecoration: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5.h),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
borderSide: BorderSide(
|
||||
color: appTheme.gray50,
|
||||
width: 1,
|
||||
@@ -176,7 +176,7 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
maxLines: 4,
|
||||
fillColor: appTheme.gray50,
|
||||
borderDecoration: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5.h),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
borderSide: BorderSide(
|
||||
color: appTheme.gray50,
|
||||
width: 1,
|
||||
@@ -203,8 +203,8 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
if (!isLoading)
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 40.h,
|
||||
vertical: 80.v,
|
||||
horizontal: 40,
|
||||
vertical: 80,
|
||||
),
|
||||
decoration: AppDecoration.fillGray.copyWith(
|
||||
borderRadius: BorderRadiusStyle.roundedBorder5,
|
||||
@@ -215,8 +215,8 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 7.h,
|
||||
top: 5.v,
|
||||
left: 7,
|
||||
top: 5,
|
||||
),
|
||||
child: Text(
|
||||
"Добавить фото",
|
||||
@@ -233,9 +233,9 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
),
|
||||
/*if (isLoading)
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 10.h),
|
||||
margin: EdgeInsets.symmetric(horizontal: 10),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 40.h,
|
||||
horizontal: 40,
|
||||
vertical: 80.v,
|
||||
),
|
||||
decoration: AppDecoration.fillGray.copyWith(
|
||||
@@ -258,11 +258,11 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
|
||||
return Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 16.h,
|
||||
bottom: 10.h,
|
||||
left: 16,
|
||||
right: 16,
|
||||
bottom: 10,
|
||||
),
|
||||
padding: EdgeInsets.all(12.h),
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
@@ -292,7 +292,7 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
maxLines: 4,
|
||||
fillColor: appTheme.gray50,
|
||||
borderDecoration: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5.h),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
borderSide: BorderSide(
|
||||
color: appTheme.gray50,
|
||||
width: 1,
|
||||
@@ -361,11 +361,11 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
_buildAdditional(BuildContext context, RecipeEditLoadedState state) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 16.h,
|
||||
bottom: 10.h,
|
||||
left: 16,
|
||||
right: 16,
|
||||
bottom: 10,
|
||||
),
|
||||
padding: EdgeInsets.all(12.h),
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
@@ -390,7 +390,7 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
hintText: "YouTube",
|
||||
fillColor: appTheme.gray50,
|
||||
borderDecoration: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5.h),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
borderSide: BorderSide(
|
||||
color: appTheme.gray50,
|
||||
width: 1,
|
||||
@@ -414,7 +414,7 @@ class RecipeEditScreen extends StatelessWidget {
|
||||
initialValue: initialText,
|
||||
fillColor: appTheme.gray50,
|
||||
borderDecoration: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5.h),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
borderSide: BorderSide(
|
||||
color: appTheme.gray50,
|
||||
width: 1,
|
||||
|
||||
@@ -72,20 +72,20 @@ class RecipeSelectScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
child: CustomAppBar(
|
||||
height: 54.v,
|
||||
leadingWidth: 28.h,
|
||||
height: 54,
|
||||
leadingWidth: 28,
|
||||
leading: AppbarLeadingImage(
|
||||
imagePath: ImageConstant.imgArrowLeft,
|
||||
margin: EdgeInsets.only(left: 16.h, top: 15.v, bottom: 15.v),
|
||||
margin: EdgeInsets.only(left: 16, top: 15, bottom: 15),
|
||||
onTap: () => GoRouter.of(context).pop(),
|
||||
),
|
||||
title: Padding(
|
||||
padding: EdgeInsets.only(left: 20.h),
|
||||
padding: EdgeInsets.only(left: 20),
|
||||
child: Row(
|
||||
children: [
|
||||
AppbarSubtitle(
|
||||
text: "Рецепты",
|
||||
margin: EdgeInsets.only(left: 80.h, top: 12.v, bottom: 9.v),
|
||||
margin: EdgeInsets.only(left: 80, top: 12, bottom: 9),
|
||||
),
|
||||
Spacer(),
|
||||
Padding(
|
||||
|
||||
@@ -61,18 +61,18 @@ class RecipeScreen extends StatelessWidget {
|
||||
decoration: AppDecoration.fillGray,
|
||||
child: ListView(
|
||||
children: [
|
||||
SizedBox(height: 15.v),
|
||||
SizedBox(height: 15),
|
||||
_buildHeaderRow(context, state),
|
||||
SizedBox(height: 15.v),
|
||||
SizedBox(height: 15),
|
||||
_buildRecipeData(context, state),
|
||||
SizedBox(height: 15.v),
|
||||
SizedBox(height: 15),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: steps,
|
||||
),
|
||||
SizedBox(height: 15.v),
|
||||
SizedBox(height: 15),
|
||||
_buildTextField(context, state),
|
||||
SizedBox(height: 15.v),
|
||||
SizedBox(height: 15),
|
||||
_buildCommentSection(context, state),
|
||||
],
|
||||
),
|
||||
@@ -83,10 +83,10 @@ class RecipeScreen extends StatelessWidget {
|
||||
_buildHeaderRow(BuildContext context, RecipeLoadedState state) {
|
||||
final String name = state.author?['name'];
|
||||
return Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 16.h, vertical: 16.h),
|
||||
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -108,7 +108,7 @@ class RecipeScreen extends StatelessWidget {
|
||||
onTap: () => GoRouter.of(context).pop(),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 1.v),
|
||||
padding: EdgeInsets.only(top: 1),
|
||||
child: Row(
|
||||
children: [
|
||||
Align(
|
||||
@@ -142,11 +142,11 @@ class RecipeScreen extends StatelessWidget {
|
||||
_buildRecipeData(BuildContext context, RecipeLoadedState state) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 20.h,
|
||||
bottom: 10.h,
|
||||
left: 16,
|
||||
right: 20,
|
||||
bottom: 10,
|
||||
),
|
||||
padding: EdgeInsets.all(12.h),
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
@@ -343,11 +343,11 @@ class RecipeScreen extends StatelessWidget {
|
||||
_buildTextField(BuildContext context, RecipeLoadedState state) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 20.h,
|
||||
bottom: 10.h,
|
||||
left: 16,
|
||||
right: 20,
|
||||
bottom: 10,
|
||||
),
|
||||
padding: EdgeInsets.all(12.h),
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
@@ -369,7 +369,7 @@ class RecipeScreen extends StatelessWidget {
|
||||
controller: state.commentController,
|
||||
maxLines: 4,
|
||||
),
|
||||
SizedBox(height: 15.h),
|
||||
SizedBox(height: 15),
|
||||
CustomOutlinedButton(
|
||||
text: "Оставить отзыв",
|
||||
margin: EdgeInsets.only(bottom: 5),
|
||||
@@ -425,11 +425,11 @@ class RecipeScreen extends StatelessWidget {
|
||||
Widget _buildStep(BuildContext context, RecipeLoadedState state, int i) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 16.h,
|
||||
bottom: 10.h,
|
||||
left: 16,
|
||||
right: 16,
|
||||
bottom: 10,
|
||||
),
|
||||
padding: EdgeInsets.all(12.h),
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
|
||||
@@ -17,11 +17,11 @@ class CommentWidget extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h,
|
||||
right: 20.h,
|
||||
bottom: 10.h,
|
||||
left: 16,
|
||||
right: 20,
|
||||
bottom: 10,
|
||||
),
|
||||
padding: EdgeInsets.all(12.h),
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
@@ -54,15 +54,15 @@ class CommentWidget extends StatelessWidget {
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 12.h,
|
||||
top: 2.v,
|
||||
bottom: 11.v,
|
||||
left: 12,
|
||||
top: 2,
|
||||
bottom: 11,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 227.h,
|
||||
width: 227,
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
@@ -71,7 +71,7 @@ class CommentWidget extends StatelessWidget {
|
||||
),
|
||||
Spacer(),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 6.h),
|
||||
padding: EdgeInsets.only(left: 6),
|
||||
child: Text(
|
||||
commentModelObj.dateText!,
|
||||
style: theme.textTheme.bodyMedium,
|
||||
@@ -80,7 +80,7 @@ class CommentWidget extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 6.v),
|
||||
SizedBox(height: 6),
|
||||
Text(
|
||||
commentModelObj.greetingText!,
|
||||
style: CustomTextStyles.bodyMediumBluegray800,
|
||||
@@ -91,8 +91,8 @@ class CommentWidget extends StatelessWidget {
|
||||
),
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imgSend,
|
||||
height: 30.v,
|
||||
width: 30.h,
|
||||
height: 30,
|
||||
width: 30,
|
||||
margin: EdgeInsets.only(left: 5),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -66,20 +66,20 @@ class SubscribersScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
child: CustomAppBar(
|
||||
height: 54.v,
|
||||
leadingWidth: 28.h,
|
||||
height: 54,
|
||||
leadingWidth: 28,
|
||||
leading: AppbarLeadingImage(
|
||||
imagePath: ImageConstant.imgArrowLeft,
|
||||
margin: EdgeInsets.only(left: 16.h, top: 15.v, bottom: 15.v),
|
||||
margin: EdgeInsets.only(left: 16, top: 15, bottom: 15),
|
||||
onTap: () => GoRouter.of(context).pop(),
|
||||
),
|
||||
title: Padding(
|
||||
padding: EdgeInsets.only(left: 20.h),
|
||||
padding: EdgeInsets.only(left: 20),
|
||||
child: Row(
|
||||
children: [
|
||||
AppbarSubtitle(
|
||||
text: "Мои подписчики",
|
||||
margin: EdgeInsets.only(left: 80.h, top: 12.v, bottom: 9.v),
|
||||
margin: EdgeInsets.only(left: 80, top: 12, bottom: 9),
|
||||
),
|
||||
Spacer(),
|
||||
Padding(
|
||||
|
||||
@@ -12,7 +12,7 @@ class AppDecoration {
|
||||
color: theme.colorScheme.onPrimary,
|
||||
border: Border.all(
|
||||
color: appTheme.blueA400,
|
||||
width: 1.h,
|
||||
width: 1,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -20,7 +20,7 @@ class AppDecoration {
|
||||
color: theme.colorScheme.onPrimary,
|
||||
border: Border.all(
|
||||
color: theme.colorScheme.primary,
|
||||
width: 1.h,
|
||||
width: 1,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -55,7 +55,7 @@ class AppDecoration {
|
||||
static BoxDecoration get outlineBlueGray => BoxDecoration(
|
||||
border: Border.all(
|
||||
color: appTheme.blueGray800,
|
||||
width: 1.h,
|
||||
width: 1,
|
||||
strokeAlign: strokeAlignOutside,
|
||||
),
|
||||
);
|
||||
@@ -64,12 +64,12 @@ class AppDecoration {
|
||||
class BorderRadiusStyle {
|
||||
// Circle borders
|
||||
static BorderRadius get circleBorder8 => BorderRadius.circular(
|
||||
8.h,
|
||||
8,
|
||||
);
|
||||
|
||||
// Rounded borders
|
||||
static BorderRadius get roundedBorder1 => BorderRadius.circular(
|
||||
1.h,
|
||||
1,
|
||||
);
|
||||
|
||||
// Outline decorations
|
||||
@@ -78,8 +78,8 @@ class BorderRadiusStyle {
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: appTheme.black900.withOpacity(0.15),
|
||||
spreadRadius: 2.h,
|
||||
blurRadius: 2.h,
|
||||
spreadRadius: 2,
|
||||
blurRadius: 2,
|
||||
offset: Offset(
|
||||
0,
|
||||
2,
|
||||
@@ -91,49 +91,49 @@ class BorderRadiusStyle {
|
||||
static BoxDecoration get outlineBlueGray => BoxDecoration(
|
||||
border: Border.all(
|
||||
color: appTheme.blueGray800,
|
||||
width: 1.h,
|
||||
width: 1,
|
||||
strokeAlign: strokeAlignOutside,
|
||||
),
|
||||
);
|
||||
|
||||
// Circle borders
|
||||
static BorderRadius get circleBorder17 => BorderRadius.circular(
|
||||
17.h,
|
||||
17,
|
||||
);
|
||||
|
||||
static BorderRadius get circleBorder20 => BorderRadius.circular(
|
||||
20.h,
|
||||
20,
|
||||
);
|
||||
|
||||
static BorderRadius get circleBorder62 => BorderRadius.circular(
|
||||
62.h,
|
||||
62,
|
||||
);
|
||||
|
||||
// Custom borders
|
||||
static BorderRadius get customBorderBL8 => BorderRadius.only(
|
||||
bottomLeft: Radius.circular(8.h),
|
||||
bottomLeft: Radius.circular(8),
|
||||
);
|
||||
|
||||
static BorderRadius get customBorderTL5 => BorderRadius.vertical(
|
||||
top: Radius.circular(5.h),
|
||||
top: Radius.circular(5),
|
||||
);
|
||||
|
||||
static BorderRadius get customBorderTL51 => BorderRadius.only(
|
||||
topLeft: Radius.circular(5.h),
|
||||
bottomRight: Radius.circular(5.h),
|
||||
topLeft: Radius.circular(5),
|
||||
bottomRight: Radius.circular(5),
|
||||
);
|
||||
|
||||
// Rounded borders
|
||||
static BorderRadius get roundedBorder12 => BorderRadius.circular(
|
||||
12.h,
|
||||
12,
|
||||
);
|
||||
|
||||
static BorderRadius get roundedBorder5 => BorderRadius.circular(
|
||||
5.h,
|
||||
5,
|
||||
);
|
||||
|
||||
static BorderRadius get roundedBorder8 => BorderRadius.circular(
|
||||
8.h,
|
||||
8,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ class CustomButtonStyles {
|
||||
width: 0,
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(15.h),
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class CustomTextStyles {
|
||||
|
||||
static get bodyMediumBlack90013 => theme.textTheme.bodyMedium!.copyWith(
|
||||
color: appTheme.black900,
|
||||
fontSize: 13.fSize,
|
||||
fontSize: 13,
|
||||
);
|
||||
|
||||
static get bodyMediumBluegray800 => theme.textTheme.bodyMedium!.copyWith(
|
||||
@@ -42,27 +42,27 @@ class CustomTextStyles {
|
||||
|
||||
static get bodySmallMulishBlack900 => theme.textTheme.bodySmall!.mulish.copyWith(
|
||||
color: appTheme.black900,
|
||||
fontSize: 12.fSize,
|
||||
fontSize: 12,
|
||||
);
|
||||
|
||||
static get bodySmallMulishBluegray800 => theme.textTheme.bodySmall!.mulish.copyWith(
|
||||
color: appTheme.blueGray800,
|
||||
fontSize: 12.fSize,
|
||||
fontSize: 12,
|
||||
);
|
||||
|
||||
static get bodySmallMulishBluegray80012 => theme.textTheme.bodySmall!.mulish.copyWith(
|
||||
color: appTheme.blueGray800,
|
||||
fontSize: 12.fSize,
|
||||
fontSize: 12,
|
||||
);
|
||||
|
||||
static get bodySmallMulishBluegray80012_1 => theme.textTheme.bodySmall!.mulish.copyWith(
|
||||
color: appTheme.blueGray800,
|
||||
fontSize: 12.fSize,
|
||||
fontSize: 12,
|
||||
);
|
||||
|
||||
static get bodySmallMulishBluegray900 => theme.textTheme.bodySmall!.mulish.copyWith(
|
||||
color: appTheme.blueGray900,
|
||||
fontSize: 12.fSize,
|
||||
fontSize: 12,
|
||||
);
|
||||
|
||||
static get bodySmallMulishGray600 => theme.textTheme.bodySmall!.mulish.copyWith(
|
||||
@@ -71,12 +71,12 @@ class CustomTextStyles {
|
||||
|
||||
static get bodySmallMulishPrimary => theme.textTheme.bodySmall!.mulish.copyWith(
|
||||
color: theme.colorScheme.primary,
|
||||
fontSize: 12.fSize,
|
||||
fontSize: 12,
|
||||
);
|
||||
|
||||
static get bodySmallSegoeUIBlack900 => theme.textTheme.bodySmall!.segoeUI.copyWith(
|
||||
color: appTheme.black900,
|
||||
fontSize: 12.fSize,
|
||||
fontSize: 12,
|
||||
);
|
||||
|
||||
// Label text style
|
||||
@@ -90,11 +90,11 @@ class CustomTextStyles {
|
||||
|
||||
// Title text style
|
||||
static get titleMedium16 => theme.textTheme.titleMedium!.copyWith(
|
||||
fontSize: 16.fSize,
|
||||
fontSize: 16,
|
||||
);
|
||||
|
||||
static get titleMediumBlack => theme.textTheme.titleMedium!.copyWith(
|
||||
fontSize: 17.fSize,
|
||||
fontSize: 17,
|
||||
fontWeight: FontWeight.w900,
|
||||
);
|
||||
|
||||
@@ -131,7 +131,7 @@ class CustomTextStyles {
|
||||
);
|
||||
|
||||
static get titleSmallBold => theme.textTheme.titleSmall!.copyWith(
|
||||
fontSize: 15.fSize,
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w700,
|
||||
);
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
import '../../core/app_export.dart';
|
||||
|
||||
/// Helper class for managing themes and colors.
|
||||
class ThemeHelper {
|
||||
// The current app theme
|
||||
@@ -106,10 +104,10 @@ class ThemeHelper {
|
||||
backgroundColor: Colors.transparent,
|
||||
side: BorderSide(
|
||||
color: colorScheme.primary,
|
||||
width: 1.h,
|
||||
width: 1,
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(15.h),
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
),
|
||||
visualDensity: const VisualDensity(
|
||||
vertical: -4,
|
||||
|
||||
@@ -26,8 +26,8 @@ class AppbarLeadingImage extends StatelessWidget {
|
||||
padding: margin ?? EdgeInsets.zero,
|
||||
child: CustomImageView(
|
||||
imagePath: imagePath,
|
||||
height: 26.v,
|
||||
width: 13.h,
|
||||
height: 26,
|
||||
width: 13,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -23,11 +23,11 @@ class AppbarTitleCircleimage extends StatelessWidget {
|
||||
padding: margin ?? EdgeInsets.zero,
|
||||
child: CustomImageView(
|
||||
imagePath: imagePath,
|
||||
height: 40.adaptSize,
|
||||
width: 40.adaptSize,
|
||||
height: 40,
|
||||
width: 40,
|
||||
fit: BoxFit.contain,
|
||||
radius: BorderRadius.circular(
|
||||
20.h,
|
||||
20,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
@@ -11,26 +10,19 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
this.title,
|
||||
this.centerTitle,
|
||||
this.actions,
|
||||
}) : super(
|
||||
key: key,
|
||||
);
|
||||
}) : super(key: key);
|
||||
|
||||
final double? height;
|
||||
|
||||
final double? leadingWidth;
|
||||
|
||||
final Widget? leading;
|
||||
|
||||
final Widget? title;
|
||||
|
||||
final bool? centerTitle;
|
||||
|
||||
final List<Widget>? actions;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppBar(
|
||||
toolbarHeight: height ?? 56.v,
|
||||
toolbarHeight: height ?? 56,
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor: Colors.transparent,
|
||||
leadingWidth: leadingWidth ?? 0,
|
||||
@@ -43,8 +35,5 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
}
|
||||
|
||||
@override
|
||||
Size get preferredSize => Size(
|
||||
mediaQueryData.size.width,
|
||||
height ?? 56.v,
|
||||
);
|
||||
Size get preferredSize => Size(double.infinity, height ?? 56);
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ class _ExpandableListState extends State<ExpandableList> {
|
||||
onPressed: () => sendProfileData(state),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
text: "save".tr.toUpperCase(),
|
||||
margin: EdgeInsets.only(top: 20.h, bottom: 20.h),
|
||||
margin: EdgeInsets.only(top: 20, bottom: 20),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
@@ -41,7 +41,7 @@ class CustomOutlinedButton extends BaseButton {
|
||||
return Align(
|
||||
alignment: alignment ?? Alignment.center,
|
||||
child: Container(
|
||||
height: this.height ?? 30.v,
|
||||
height: this.height ?? 30,
|
||||
width: this.width ?? double.maxFinite,
|
||||
margin: margin,
|
||||
decoration: decoration,
|
||||
@@ -65,7 +65,7 @@ class CustomOutlinedButton extends BaseButton {
|
||||
);
|
||||
} else {
|
||||
return Container(
|
||||
height: this.height ?? 30.v,
|
||||
height: this.height ?? 30,
|
||||
width: this.width ?? double.maxFinite,
|
||||
margin: margin,
|
||||
decoration: decoration,
|
||||
@@ -91,7 +91,7 @@ class CustomOutlinedButton extends BaseButton {
|
||||
|
||||
/*_buildAppBarbuildOutlinedButtonWidget() {
|
||||
return Container(
|
||||
height: this.height ?? 30.v,
|
||||
height: this.height ?? 30,
|
||||
width: this.width ?? double.maxFinite,
|
||||
margin: margin,
|
||||
decoration: decoration,
|
||||
|
||||
@@ -41,7 +41,7 @@ class NextStepButton extends BaseButton {
|
||||
? Align(
|
||||
alignment: alignment!,
|
||||
child: Container(
|
||||
height: this.height ?? 30.v,
|
||||
height: this.height ?? 30,
|
||||
width: this.width ?? double.maxFinite,
|
||||
margin: margin,
|
||||
decoration: decoration,
|
||||
@@ -64,7 +64,7 @@ class NextStepButton extends BaseButton {
|
||||
),
|
||||
)
|
||||
: Container(
|
||||
height: this.height ?? 30.v,
|
||||
height: this.height ?? 30,
|
||||
width: this.width ?? double.maxFinite,
|
||||
margin: margin,
|
||||
decoration: decoration,
|
||||
|
||||
@@ -41,7 +41,7 @@ class NextStepButton extends BaseButton {
|
||||
? Align(
|
||||
alignment: alignment!,
|
||||
child: Container(
|
||||
height: this.height ?? 30.v,
|
||||
height: this.height ?? 30,
|
||||
width: this.width ?? double.maxFinite,
|
||||
margin: margin,
|
||||
decoration: decoration,
|
||||
@@ -64,7 +64,7 @@ class NextStepButton extends BaseButton {
|
||||
),
|
||||
)
|
||||
: Container(
|
||||
height: this.height ?? 30.v,
|
||||
height: this.height ?? 30,
|
||||
width: this.width ?? double.maxFinite,
|
||||
margin: margin,
|
||||
decoration: decoration,
|
||||
|
||||
Reference in New Issue
Block a user