Added flavers env and prod for android and ios including Google services

This commit is contained in:
Abdullah Alassaf
2024-09-21 17:17:54 +03:00
parent e23210777a
commit 7279215cdc
26 changed files with 873 additions and 254 deletions
@@ -16,60 +16,55 @@ class AppBarHomeDropdown extends StatelessWidget {
builder: (context, state) {
return Padding(
padding: const EdgeInsets.only(left: 10, right: 10),
child: Center(
child: DropdownButton(
icon: const Icon(
Icons.expand_more,
color: ColorsManager.textPrimaryColor,
size: 16,
),
underline: const SizedBox.shrink(),
padding: EdgeInsets.zero,
borderRadius: BorderRadius.circular(20),
value: HomeCubit.getInstance().selectedSpace!.id,
items: HomeCubit.getInstance().spaces!.map((space) {
return DropdownMenuItem(
alignment: AlignmentDirectional.centerStart,
value: space.id,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
SvgPicture.asset(
Assets.assetsIconsHome,
width: 25,
height: 25,
colorFilter: const ColorFilter.mode(
ColorsManager.textPrimaryColor,
BlendMode.srcIn,
),
),
const SizedBox(width: 5),
Flexible(
fit: FlexFit.loose,
child: BodyMedium(
text: space.name ?? "??",
style: context.bodyMedium.copyWith(
fontSize: 15,
color: ColorsManager.textPrimaryColor,
overflow: TextOverflow.ellipsis,
),
),
),
const SizedBox(width: 5),
],
),
);
}).toList(),
onChanged: (value) {
if (value != null) {
HomeCubit.getInstance().changeSelectedSpace(
HomeCubit.getInstance()
.spaces!
.firstWhere((element) => element.id == value));
}
},
child: DropdownButton(
icon: const Icon(
Icons.expand_more,
color: ColorsManager.textPrimaryColor,
size: 16,
),
underline: const SizedBox.shrink(),
padding: EdgeInsets.zero,
borderRadius: BorderRadius.circular(20),
value: HomeCubit.getInstance().selectedSpace!.id,
items: HomeCubit.getInstance().spaces!.map((space) {
return DropdownMenuItem(
alignment: AlignmentDirectional.centerStart,
value: space.id,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
SvgPicture.asset(
Assets.assetsIconsHome,
width: 25,
height: 25,
colorFilter: const ColorFilter.mode(
ColorsManager.textPrimaryColor,
BlendMode.srcIn,
),
),
const SizedBox(width: 5),
Flexible(
child: BodyMedium(
text: space.name ?? "??",
style: context.bodyMedium.copyWith(
fontSize: 15,
color: ColorsManager.textPrimaryColor,
overflow: TextOverflow.ellipsis,
),
),
),
const SizedBox(width: 5),
],
),
);
}).toList(),
onChanged: (value) {
if (value != null) {
HomeCubit.getInstance().changeSelectedSpace(
HomeCubit.getInstance().spaces!.firstWhere((element) => element.id == value));
}
},
),
);
},
@@ -11,20 +11,18 @@ class DefaultAppBar extends StatelessWidget implements PreferredSizeWidget {
Widget build(BuildContext context) {
return BlocBuilder<HomeCubit, HomeState>(
builder: (context, state) {
return Padding(
return Container(
padding: const EdgeInsets.only(
top: 20,
),
child: AppBar(
backgroundColor: Colors.transparent,
leadingWidth: 150,
leadingWidth: 200,
toolbarHeight: Constants.appBarHeight,
leading: HomeCubit.getInstance().spaces!.isNotEmpty
? HomeCubit.appBarLeading[
HomeCubit.bottomNavItems[HomeCubit.pageIndex].label]
? HomeCubit.appBarLeading[HomeCubit.bottomNavItems[HomeCubit.pageIndex].label]!
: null,
actions: HomeCubit.appBarActions[
HomeCubit.bottomNavItems[HomeCubit.pageIndex].label],
actions: HomeCubit.appBarActions[HomeCubit.bottomNavItems[HomeCubit.pageIndex].label],
));
},
);
@@ -71,44 +71,49 @@ class ParameterControlDialogState extends State<ParameterControlDialog> {
),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
IconButton(
onPressed: () {
setState(() {
_value = (_value - 1).clamp(widget.min, widget.max);
});
},
icon: const Icon(
Icons.remove,
color: Colors.grey,
SizedBox(
width: MediaQuery.sizeOf(context).width,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
IconButton(
onPressed: () {
setState(() {
_value = (_value - 1).clamp(widget.min, widget.max);
});
},
icon: const Icon(
Icons.remove,
color: Colors.grey,
),
),
),
Slider(
value: _value.toDouble(),
onChanged: (value) {
setState(() {
_value = value.toInt();
});
},
min: widget.min.toDouble(),
max: widget.max.toDouble(),
label: _value.toString(),
inactiveColor: ColorsManager.greyColor,
),
IconButton(
onPressed: () {
setState(() {
_value = (_value + 1).clamp(widget.min, widget.max);
});
},
icon: const Icon(
Icons.add,
color: Colors.grey,
Flexible(
child: Slider(
value: _value.toDouble(),
onChanged: (value) {
setState(() {
_value = value.toInt();
});
},
min: widget.min.toDouble(),
max: widget.max.toDouble(),
label: _value.toString(),
inactiveColor: ColorsManager.greyColor,
),
),
),
],
IconButton(
onPressed: () {
setState(() {
_value = (_value + 1).clamp(widget.min, widget.max);
});
},
icon: const Icon(
Icons.add,
color: Colors.grey,
),
),
],
),
),
Container(
height: 1,
+2 -2
View File
@@ -7,6 +7,7 @@ import 'package:syncrow_app/features/menu/view/widgets/profile/profile_tab.dart'
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
import 'package:syncrow_app/services/locator.dart';
import 'package:syncrow_app/utils/context_extension.dart';
import 'package:syncrow_app/utils/resource_manager/constants.dart';
@@ -33,8 +34,7 @@ class MenuView extends StatelessWidget {
const SizedBox(
height: 15,
),
const BodyMedium(
text: String.fromEnvironment('FLAVOR', defaultValue: 'production')),
BodyMedium(text: serviceLocator.get<String>()),
const SizedBox(
height: 15,
),