Skip to content

Commit

Permalink
Merge pull request #8 from OpenShock/dev/update_animation_speed
Browse files Browse the repository at this point in the history
Updating Animation Speed and other minor bugs
  • Loading branch information
ImmaCodePrivate authored Oct 5, 2024
2 parents 90186fd + 4d27a10 commit f7ebd03
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 48 deletions.
2 changes: 1 addition & 1 deletion lib/component/BottomNavbarWidget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class BottomNavbarWidget extends StatelessWidget {
this.backgroundColor,
this.itemCornerRadius = 50,
this.containerHeight = 56,
this.animationDuration = const Duration(milliseconds: 270),
this.animationDuration = const Duration(milliseconds: 150),
this.mainAxisAlignment = MainAxisAlignment.spaceAround,
required this.items,
required this.onItemSelected,
Expand Down
3 changes: 2 additions & 1 deletion lib/fragments/HomeFragment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class HomeFragmentState extends State<HomeFragment> {
).cornerRadiusWithClipRRectOnly(bottomLeft: 20).onTap(
() {
SettingScreen().launch(context,
pageRouteAnimation: PageRouteAnimation.Scale);
pageRouteAnimation: PageRouteAnimation.Scale,
duration: Duration(milliseconds: 150));
},
),
),
Expand Down
1 change: 1 addition & 0 deletions lib/fragments/SharedUsersFragment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class SharedUsersFragmentState extends State<SharedUsersFragment> {
code = value;
},
decoration: InputDecoration(hintText: "Enter code"),
style: TextStyle(color: white),
),
actions: [
TextButton(
Expand Down
3 changes: 2 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ AppStore appStore = AppStore();
late Openshockapi clientApi; // Declare your global API client object

late SelfUser user; // Declare global user objec
final appVersion = '1.0.0-BETA';
final appVersion = '1.0.3';

final storage = new FlutterSecureStorage();
const isDarkModeOnPref = 'isDarkModeOnPref';
Expand Down Expand Up @@ -56,6 +56,7 @@ class MyApp extends StatelessWidget {
: AppThemeData.darkTheme,
navigatorKey: navigatorKey,
scrollBehavior: SBehavior(),
themeAnimationDuration: Duration(milliseconds: 150),
supportedLocales: LanguageDataModel.languageLocales(),
localeResolutionCallback: (locale, supportedLocales) => locale,
),
Expand Down
6 changes: 3 additions & 3 deletions lib/model/shockobjs/OwnShocker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ class OwnShocker {
}

Future<bool> shock(Openshockapi api, int int, int dur) async {
return api.sendControlSignal(this.id, int, dur, "SHOCK");
return api.sendControlSignal(this.id, int, dur, "Shock");
}

Future<bool> beep(Openshockapi api, int int, int dur) async {
return api.sendControlSignal(this.id, int, dur, "BEEP");
return api.sendControlSignal(this.id, int, dur, "Sound");
}

Future<bool> vibrate(Openshockapi api, int int, int dur) async {
return api.sendControlSignal(this.id, int, dur, "VIBRATE");
return api.sendControlSignal(this.id, int, dur, "Vibrate");
}
}
6 changes: 3 additions & 3 deletions lib/model/shockobjs/SharedUserShocker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ class SharedUserShocker {
}

Future<bool> shock(Openshockapi api, int int, int dur) async {
return api.sendControlSignal(this.id, int, dur, "SHOCK");
return api.sendControlSignal(this.id, int, dur, "Shock");
}

Future<bool> beep(Openshockapi api, int int, int dur) async {
return api.sendControlSignal(this.id, int, dur, "BEEP");
return api.sendControlSignal(this.id, int, dur, "Sound");
}

Future<bool> vibrate(Openshockapi api, int int, int dur) async {
return api.sendControlSignal(this.id, int, dur, "VIBRATE");
return api.sendControlSignal(this.id, int, dur, "Vibrate");
}
}
11 changes: 7 additions & 4 deletions lib/screens/EditProfileScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ class EditProfileScreenState extends State<EditProfileScreen> {
}

void init() async {
//
emailController.text = user.email;
fNameController.text = user.name;
}

@override
Expand All @@ -32,8 +33,6 @@ class EditProfileScreenState extends State<EditProfileScreen> {
}

void setValue() {
emailController.text = user.email;
fNameController.text = user.name;
setState(() {});
}

Expand All @@ -46,7 +45,11 @@ class EditProfileScreenState extends State<EditProfileScreen> {
width: context.width(),
text: 'Update',
onTap: () {
setValue();
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
"This feature is not yet available, please update your details on the website.")),
);
},
).paddingSymmetric(horizontal: 16, vertical: 24),
appBar: appBarWidget(
Expand Down
30 changes: 13 additions & 17 deletions lib/screens/SettingScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,21 @@ class SettingScreenState extends State<SettingScreen> {
title: 'Edit Profile',
textColor: white,
onTap: () {
EditProfileScreen().launch(
context,
pageRouteAnimation: PageRouteAnimation.SlideBottomTop,
);
EditProfileScreen().launch(context,
pageRouteAnimation: PageRouteAnimation.SlideBottomTop,
duration: Duration(milliseconds: 150));
},
),
settIngContainer(
icon: Icons.person,
title: 'Member',
textColor: white,
onTap: () {},
),
settIngContainer(
icon: Icons.settings, title: 'Setting', textColor: white),
16.height,
64.height,
64.height,
16.height,
16.height,
// settIngContainer(
// icon: Icons.person,
// title: 'Member',
// textColor: white,
// onTap: () {},
// ),
// settIngContainer(
// icon: Icons.settings, title: 'Setting', textColor: white),

256.height,

// settIngContainer(
// icon: Icons.chat,
Expand Down
16 changes: 0 additions & 16 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -930,22 +930,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.0"
syncfusion_flutter_core:
dependency: transitive
description:
name: syncfusion_flutter_core
sha256: "6e67726b85812afc7105725a23620b876ab7f6b04b8410e211330ffb8c2cdbe8"
url: "https://pub.dev"
source: hosted
version: "26.2.14"
syncfusion_flutter_gauges:
dependency: "direct main"
description:
name: syncfusion_flutter_gauges
sha256: "1962f55f6424484f6701b5bfc00733fa84f320d4228f3a9c059cc077e5efb02c"
url: "https://pub.dev"
source: hosted
version: "26.2.14"
synchronized:
dependency: transitive
description:
Expand Down
3 changes: 1 addition & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A flutter project.

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.2+5
version: 1.0.3+6

environment:
sdk: '>=3.0.0 <4.0.0'
Expand All @@ -23,7 +23,6 @@ dependencies:
flutter_mobx: ^2.2.1+1

# Smart Home
syncfusion_flutter_gauges: ^26.2.13
cached_network_image: ^3.4.1
dashed_circle: ^0.0.2
dotted_line: ^3.2.2
Expand Down

0 comments on commit f7ebd03

Please sign in to comment.