mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-24 16:27:54 +00:00
replaced Gap Class with the appropriate SizedBox
removed the Gap dependency
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
import '../../../../generated/assets.dart';
|
||||
@@ -30,9 +29,9 @@ class AppBarHomeDropdown extends StatelessWidget {
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
const Gap(5),
|
||||
const SizedBox(width: 5),
|
||||
const BodyLarge(text: 'Home'),
|
||||
const Gap(5),
|
||||
const SizedBox(width: 5),
|
||||
const Icon(
|
||||
Icons.expand_more,
|
||||
color: Colors.black,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_text_button.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/syncrow_logo.dart';
|
||||
|
||||
@@ -26,12 +25,12 @@ class AuthViewBody extends StatelessWidget {
|
||||
Navigator.popAndPushNamed(context, Routes.homeRoute);
|
||||
},
|
||||
),
|
||||
const Gap(15),
|
||||
const SizedBox(height: 15),
|
||||
const DefaultTextButton(
|
||||
text: 'Sign Up',
|
||||
isSecondary: true,
|
||||
),
|
||||
const Gap(20),
|
||||
const SizedBox(height: 20),
|
||||
Center(
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
@@ -43,7 +42,7 @@ class AuthViewBody extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const Gap(30),
|
||||
const SizedBox(height: 30),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/widgets/carbon_emission.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/widgets/consumption.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/widgets/live_monitor_tab.dart';
|
||||
@@ -28,7 +27,7 @@ class DashboardView extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const LiveMonitorTab(),
|
||||
const Gap(10),
|
||||
const SizedBox(height: 10),
|
||||
const EnergyUsage(),
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: 20),
|
||||
@@ -40,7 +39,7 @@ class DashboardView extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Consumption(),
|
||||
Gap(20),
|
||||
SizedBox(height: 20),
|
||||
CarbonEmission(),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/widgets/card_title.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/united_text.dart';
|
||||
@@ -31,7 +30,7 @@ class CarbonEmission extends StatelessWidget {
|
||||
const CardTitle(
|
||||
title: "Carbon Emission",
|
||||
),
|
||||
const Gap(10),
|
||||
const SizedBox(height: 10),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
@@ -46,7 +45,7 @@ class CarbonEmission extends StatelessWidget {
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
const Gap(5),
|
||||
const SizedBox(height: 5),
|
||||
const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -64,7 +63,7 @@ class CarbonEmission extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
const Gap(20),
|
||||
const SizedBox(width: 20),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -76,7 +75,7 @@ class CarbonEmission extends StatelessWidget {
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
const Gap(5),
|
||||
const SizedBox(width: 5),
|
||||
const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/widgets/card_title.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/united_text.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
|
||||
@@ -44,7 +43,7 @@ class Consumption extends StatelessWidget {
|
||||
valueWeight: FontWeight.normal,
|
||||
unit: "Units",
|
||||
),
|
||||
const Gap(30),
|
||||
const SizedBox(width: 30),
|
||||
UnitedText(
|
||||
value: "${MediaQuery.sizeOf(context).height.ceil()}",
|
||||
valueSize: MediaQuery.sizeOf(context).height.ceil() > 680
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
|
||||
@@ -37,7 +36,7 @@ class LiveMonitorWidget extends StatelessWidget {
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
const Gap(5),
|
||||
const SizedBox(width: 5),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/devices/model/ac_model.dart';
|
||||
import 'package:syncrow_app/features/devices/view/widgets/ACs/ac_interface_controls.dart';
|
||||
import 'package:syncrow_app/features/devices/view/widgets/ACs/ac_interface_temp_unit.dart';
|
||||
@@ -17,7 +16,7 @@ class AcInterface extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
const Gap(20),
|
||||
const SizedBox(height: 20),
|
||||
ConstrainedBox(
|
||||
constraints: const BoxConstraints(
|
||||
maxHeight: 400,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/devices/model/ac_model.dart';
|
||||
import 'package:syncrow_app/features/devices/view/widgets/ACs/ac_mode_control_unit.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
@@ -21,9 +20,9 @@ class AcInterfaceControls extends StatelessWidget {
|
||||
flex: 3,
|
||||
child: Column(
|
||||
children: [
|
||||
const Gap(10),
|
||||
const SizedBox(height: 10),
|
||||
ACModeControlUnit(model: acModel),
|
||||
Gap(10),
|
||||
const SizedBox(height: 10),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
@@ -37,7 +36,7 @@ class AcInterfaceControls extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const Gap(10),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/devices/model/ac_model.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
|
||||
@@ -53,7 +52,7 @@ class _ACModeControlUnitState extends State<ACModeControlUnit> {
|
||||
),
|
||||
),
|
||||
),
|
||||
const Gap(10),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/devices/bloc/ac_cubit.dart';
|
||||
import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
|
||||
import 'package:syncrow_app/features/devices/view/widgets/ACs/ac_mode_control_unit.dart';
|
||||
@@ -21,13 +20,13 @@ class ACsList extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// universal AC controller
|
||||
const Gap(10),
|
||||
const SizedBox(height: 10),
|
||||
const BodySmall(text: "All ACs"),
|
||||
const Gap(5),
|
||||
const SizedBox(height: 5),
|
||||
const UniversalACSwitch(),
|
||||
const Gap(10),
|
||||
const SizedBox(height: 10),
|
||||
const UniversalACTemp(),
|
||||
const Gap(10),
|
||||
const SizedBox(height: 10),
|
||||
|
||||
// other ACs controls
|
||||
ListView.builder(
|
||||
@@ -63,19 +62,19 @@ class ACsList extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
const Gap(5),
|
||||
const SizedBox(height: 5),
|
||||
DevicesDefaultSwitch(
|
||||
model: DevicesCubit.categories[0].devices[index],
|
||||
),
|
||||
const Gap(10),
|
||||
const SizedBox(height: 10),
|
||||
ACTempWidget(
|
||||
index,
|
||||
),
|
||||
const Gap(10),
|
||||
const SizedBox(height: 10),
|
||||
ACModeControlUnit(
|
||||
model: DevicesCubit.categories[0].devices[index],
|
||||
),
|
||||
const Gap(10),
|
||||
const SizedBox(height: 10),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
|
||||
@@ -34,7 +33,7 @@ class DevicesModeTab extends StatelessWidget {
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
const Gap(5),
|
||||
const SizedBox(width: 5),
|
||||
const BodySmall(
|
||||
text: StringsManager.winter,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -62,7 +61,7 @@ class DevicesModeTab extends StatelessWidget {
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
const Gap(5),
|
||||
const SizedBox(width: 5),
|
||||
const BodySmall(
|
||||
text: StringsManager.summer,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_text_button.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
|
||||
@@ -20,7 +19,7 @@ class NoDevicesView extends StatelessWidget {
|
||||
scale: 1,
|
||||
width: 140,
|
||||
),
|
||||
const Gap(15),
|
||||
const SizedBox(height: 15),
|
||||
const Text(
|
||||
'No Devices',
|
||||
style: TextStyle(
|
||||
@@ -28,7 +27,7 @@ class NoDevicesView extends StatelessWidget {
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
const Gap(15),
|
||||
const SizedBox(height: 15),
|
||||
const DefaultTextButton(
|
||||
text: 'Add Device',
|
||||
),
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/menu/model/menu_list_model.dart';
|
||||
import 'package:syncrow_app/features/menu/view/widgets/menu_list_divider.dart';
|
||||
import 'package:syncrow_app/features/menu/view/widgets/menu_list_item.dart';
|
||||
@@ -19,11 +18,11 @@ class MenuList extends StatelessWidget {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
const Gap(5),
|
||||
const SizedBox(height: 5),
|
||||
BodySmall(
|
||||
text: listModel.label!,
|
||||
),
|
||||
const Gap(5),
|
||||
const SizedBox(height: 5),
|
||||
DefaultContainer(
|
||||
child: ListView.separated(
|
||||
shrinkWrap: true,
|
||||
@@ -37,7 +36,7 @@ class MenuList extends StatelessWidget {
|
||||
},
|
||||
separatorBuilder: (context, index) => const MenuListDivider()),
|
||||
),
|
||||
const Gap(5),
|
||||
const SizedBox(height: 5),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
@@ -20,7 +19,7 @@ class ProfileTab extends StatelessWidget {
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Gap(20),
|
||||
SizedBox(height: 20),
|
||||
DefaultContainer(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/scene_cubit.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
@@ -29,7 +28,7 @@ class SceneView extends StatelessWidget {
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const Gap(20),
|
||||
const SizedBox(height: 20),
|
||||
const BodySmall(
|
||||
text: StringsManager.tapToRunRoutine,
|
||||
),
|
||||
@@ -71,7 +70,7 @@ class SceneView extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const Gap(10),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_text_button.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
|
||||
@@ -22,13 +21,13 @@ class SceneViewNoScenes extends StatelessWidget {
|
||||
opacity: const AlwaysStoppedAnimation(.5),
|
||||
width: 140,
|
||||
),
|
||||
const Gap(15),
|
||||
const SizedBox(height: 15),
|
||||
const Text(
|
||||
'Home automation saves your time and effort by automating routine tasks.',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: Colors.grey),
|
||||
),
|
||||
const Gap(20),
|
||||
const SizedBox(height: 20),
|
||||
const DefaultTextButton(
|
||||
text: 'Create Scene',
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user