Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2098 Fix:Overflow Error on PostWideget #2104

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions lib/widgets/multi_reaction.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class _MultiReactionButtonState extends State<MultiReactButton> {
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',
),
Expand All @@ -36,8 +36,8 @@ class _MultiReactionButtonState extends State<MultiReactButton> {
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',
),
Expand All @@ -49,8 +49,8 @@ class _MultiReactionButtonState extends State<MultiReactButton> {
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',
),
Expand All @@ -62,8 +62,8 @@ class _MultiReactionButtonState extends State<MultiReactButton> {
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',
),
Expand All @@ -75,8 +75,8 @@ class _MultiReactionButtonState extends State<MultiReactButton> {
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',
),
Expand All @@ -88,8 +88,8 @@ class _MultiReactionButtonState extends State<MultiReactButton> {
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',
),
Expand All @@ -101,8 +101,8 @@ class _MultiReactionButtonState extends State<MultiReactButton> {
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',
),
Expand Down
12 changes: 7 additions & 5 deletions lib/widgets/post_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class NewsPost extends StatelessWidget {
fontSize: 20,
),
title: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"${post.creator!.firstName} ${post.creator!.lastName}",
Expand All @@ -66,9 +67,6 @@ class NewsPost extends StatelessWidget {
color: Colors.black38,
),
),
const SizedBox(
width: 115,
),
IconButton(
onPressed: () {
showModalBottomSheet<void>(
Expand Down Expand Up @@ -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',
),
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -93,17 +88,6 @@ Future<void> main() async {
TestWidgetsFlutterBinding.ensureInitialized();
locator<GraphqlConfig>().test();
locator<SizeConfig>().test();
final Directory dir = Directory('temporaryPath');
Hive
..init(dir.path)
..registerAdapter(UserAdapter())
..registerAdapter(OrgInfoAdapter());
await Hive.openBox<User>('currentUser');
await Hive.openBox<OrgInfo>('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 {
Expand Down Expand Up @@ -243,12 +227,6 @@ Future<void> 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();
});
});
}
Loading