replaced Gap Class with the appropriate SizedBox

removed the Gap dependency
This commit is contained in:
Mohammad Salameh
2024-03-02 15:52:28 +03:00
parent 3b06e30c9c
commit 481fe1c0f3
19 changed files with 47 additions and 107 deletions
@@ -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',
),