Skip to content

Commit

Permalink
modified
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhin29 committed Nov 28, 2023
1 parent 960d334 commit 758f878
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
11 changes: 6 additions & 5 deletions lib/widgets/pinned_post.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:talawa/locator.dart';
import 'package:talawa/models/post/post_model.dart';
import 'package:talawa/services/size_config.dart';
import 'package:talawa/views/after_auth_screens/feed/pinned_post_screen.dart';
Expand Down Expand Up @@ -102,10 +101,12 @@ class PinnedPost extends StatelessWidget {
child: GestureDetector(
onTap: () {
// final Map<String, dynamic> arg = {"index": "$index","post": pinnedPosts};
Navigator.of(context).push(MaterialPageRoute(
builder: (context) =>
PinnedPostScreen(post: pinnedPosts[index]),
));
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) =>
PinnedPostScreen(post: pinnedPosts[index]),
),
);
},
child: SizedBox(
width: SizeConfig.screenWidth! / 4.1,
Expand Down
4 changes: 0 additions & 4 deletions test/widget_tests/widgets/pinned_post_test.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/mockito.dart';
import 'package:talawa/demo_server_data/pinned_post_demo_data.dart';
import 'package:talawa/locator.dart';
import 'package:talawa/models/post/post_model.dart';
import 'package:talawa/services/navigation_service.dart';
import 'package:talawa/services/size_config.dart';
import 'package:talawa/views/after_auth_screens/feed/pinned_post_screen.dart';
import 'package:talawa/widgets/pinned_post.dart';
Expand Down Expand Up @@ -34,11 +32,9 @@ void main() {
TestWidgetsFlutterBinding.ensureInitialized();
setupLocator();
locator<SizeConfig>().test();
NavigationService navigationService;
setUp(() {
registerServices();
locator<SizeConfig>().test();
navigationService = NavigationService();
});
tearDown(() {
unregisterServices();
Expand Down

0 comments on commit 758f878

Please sign in to comment.