diff --git a/lib/widgets/multi_reaction.dart b/lib/widgets/multi_reaction.dart index 6e28e7ca3..4b822f9c6 100644 --- a/lib/widgets/multi_reaction.dart +++ b/lib/widgets/multi_reaction.dart @@ -22,8 +22,8 @@ class _MultiReactionButtonState extends State { icon: Padding( padding: const EdgeInsets.all(8.0), child: SizedBox( - height: 35, - width: 35, + height: (MediaQuery.sizeOf(context).width / 392) * 35, + width: (MediaQuery.sizeOf(context).width / 392) * 35, child: SvgPicture.asset( 'assets/images/🦆 icon _like_.svg', ), @@ -36,8 +36,8 @@ class _MultiReactionButtonState extends State { icon: Padding( padding: const EdgeInsets.all(8.0), child: SizedBox( - height: 35, - width: 35, + height: (MediaQuery.sizeOf(context).width / 392) * 35, + width: (MediaQuery.sizeOf(context).width / 392) * 35, child: SvgPicture.asset( 'assets/icons/angel.svg', ), @@ -49,8 +49,8 @@ class _MultiReactionButtonState extends State { icon: Padding( padding: const EdgeInsets.all(8.0), child: SizedBox( - height: 35, - width: 35, + height: (MediaQuery.sizeOf(context).width / 392) * 35, + width: (MediaQuery.sizeOf(context).width / 392) * 35, child: SvgPicture.asset( 'assets/icons/happy.svg', ), @@ -62,8 +62,8 @@ class _MultiReactionButtonState extends State { icon: Padding( padding: const EdgeInsets.all(8.0), child: SizedBox( - height: 35, - width: 35, + height: (MediaQuery.sizeOf(context).width / 392) * 35, + width: (MediaQuery.sizeOf(context).width / 392) * 35, child: SvgPicture.asset( 'assets/icons/laugh.svg', ), @@ -75,8 +75,8 @@ class _MultiReactionButtonState extends State { icon: Padding( padding: const EdgeInsets.all(8.0), child: SizedBox( - height: 35, - width: 35, + height: (MediaQuery.sizeOf(context).width / 392) * 35, + width: (MediaQuery.sizeOf(context).width / 392) * 35, child: SvgPicture.asset( 'assets/icons/love.svg', ), @@ -88,8 +88,8 @@ class _MultiReactionButtonState extends State { icon: Padding( padding: const EdgeInsets.all(8.0), child: SizedBox( - height: 35, - width: 35, + height: (MediaQuery.sizeOf(context).width / 392) * 35, + width: (MediaQuery.sizeOf(context).width / 392) * 35, child: SvgPicture.asset( 'assets/icons/tear.svg', ), @@ -101,8 +101,8 @@ class _MultiReactionButtonState extends State { icon: Padding( padding: const EdgeInsets.all(8.0), child: SizedBox( - height: 35, - width: 35, + height: (MediaQuery.sizeOf(context).width / 392) * 35, + width: (MediaQuery.sizeOf(context).width / 392) * 35, child: SvgPicture.asset( 'assets/icons/angry.svg', ), diff --git a/lib/widgets/post_widget.dart b/lib/widgets/post_widget.dart index aa6800e6e..10cd2681d 100644 --- a/lib/widgets/post_widget.dart +++ b/lib/widgets/post_widget.dart @@ -57,6 +57,7 @@ class NewsPost extends StatelessWidget { fontSize: 20, ), title: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( "${post.creator!.firstName} ${post.creator!.lastName}", @@ -66,9 +67,6 @@ class NewsPost extends StatelessWidget { color: Colors.black38, ), ), - const SizedBox( - width: 115, - ), IconButton( onPressed: () { showModalBottomSheet( @@ -152,8 +150,12 @@ class NewsPost extends StatelessWidget { child: Padding( padding: const EdgeInsets.all(8.0), child: SizedBox( - height: 35, - width: 35, + height: (MediaQuery.sizeOf(context).width / + 392) * + 35, + width: (MediaQuery.sizeOf(context).width / + 392) * + 35, child: SvgPicture.asset( 'assets/images/comment.svg', ), diff --git a/test/widget_tests/after_auth_screens/app_settings/app_setting_page_test.dart b/test/widget_tests/after_auth_screens/app_settings/app_setting_page_test.dart index 935f34dcc..a209bcdd7 100644 --- a/test/widget_tests/after_auth_screens/app_settings/app_setting_page_test.dart +++ b/test/widget_tests/after_auth_screens/app_settings/app_setting_page_test.dart @@ -1,19 +1,14 @@ // ignore_for_file: talawa_api_doc // ignore_for_file: talawa_good_doc_comments -import 'dart:io'; - import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; import 'package:mockito/mockito.dart'; import 'package:provider/provider.dart'; import 'package:talawa/constants/constants.dart'; import 'package:talawa/constants/custom_theme.dart'; import 'package:talawa/models/language/language_model.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; import 'package:talawa/router.dart' as router; import 'package:talawa/services/graphql_config.dart'; import 'package:talawa/services/navigation_service.dart'; @@ -93,17 +88,6 @@ Future main() async { TestWidgetsFlutterBinding.ensureInitialized(); locator().test(); locator().test(); - final Directory dir = Directory('temporaryPath'); - Hive - ..init(dir.path) - ..registerAdapter(UserAdapter()) - ..registerAdapter(OrgInfoAdapter()); - await Hive.openBox('currentUser'); - await Hive.openBox('currentOrg'); - await Hive.openBox('url'); - tearDown(() async { - await Hive.close(); - }); group('Setting Page Screen Widget Test in dark mode', () { testWidgets("Testing if Settings Screen shows up", (tester) async { @@ -243,12 +227,6 @@ Future main() async { .scaffoldBackgroundColor, TalawaTheme.darkTheme.scaffoldBackgroundColor, ); - File('temporaryPath/currentorg.hive').delete(); - File('temporaryPath/currentorg.lock').delete(); - File('temporaryPath/currentuser.hive').delete(); - File('temporaryPath/currentuser.lock').delete(); - File('temporaryPath/url.hive').delete(); - File('temporaryPath/url.lock').delete(); }); }); }