mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
replaced Gap Class with the appropriate SizedBox
removed the Gap dependency
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -28,7 +28,6 @@ migrate_working_dir/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Symbolication related
|
||||
|
@ -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',
|
||||
)
|
||||
|
56
pubspec.lock
56
pubspec.lock
@ -349,14 +349,6 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
gap:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: gap
|
||||
sha256: f19387d4e32f849394758b91377f9153a1b41d79513ef7668c088c77dbc6955d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
get_it:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -397,30 +389,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.7"
|
||||
leak_tracker:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker
|
||||
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.0.0"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
leak_tracker_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_testing
|
||||
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -433,26 +401,26 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
|
||||
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.16+1"
|
||||
version: "0.12.16"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
|
||||
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.8.0"
|
||||
version: "0.5.0"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
|
||||
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.11.0"
|
||||
version: "1.10.0"
|
||||
nested:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -473,10 +441,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.9.0"
|
||||
version: "1.8.3"
|
||||
path_parsing:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -834,14 +802,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "13.0.0"
|
||||
web:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -17,11 +17,9 @@ dependencies:
|
||||
cupertino_icons: ^1.0.6
|
||||
shared_preferences: ^2.2.2
|
||||
flutter_animated_dialog: ^2.0.1
|
||||
gap: ^3.0.1
|
||||
flutter_svg: ^2.0.9
|
||||
sleek_circular_slider: ^2.0.1
|
||||
|
||||
fl_chart: ^0.66.2
|
||||
sleek_circular_slider: ^2.0.1
|
||||
|
||||
# Utility Packages
|
||||
flutter_secure_storage: ^9.0.0
|
||||
@ -49,7 +47,6 @@ flutter:
|
||||
- assets/images/
|
||||
- assets/icons/
|
||||
- assets/fonts/
|
||||
- assets/
|
||||
fonts:
|
||||
- family: Aftika
|
||||
fonts:
|
||||
|
Reference in New Issue
Block a user