Skip to content

Commit

Permalink
update routing
Browse files Browse the repository at this point in the history
  • Loading branch information
Vicky Maulana committed Jul 12, 2023
1 parent cef7338 commit 3a234b7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
26 changes: 16 additions & 10 deletions lib/ui/home/dashboard/news_view.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:farmacare/constants/colors.dart';
import 'package:farmacare/main.dart';
import 'package:farmacare/utils/routes/routes.dart';
import 'package:flutter/material.dart';

class WorkoutView extends StatelessWidget {
Expand All @@ -24,10 +25,10 @@ class WorkoutView extends StatelessWidget {
left: 24, right: 24, top: 16, bottom: 18),
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(colors: [
AppColors.nearlyDarkBlue,
HexColor("#6F56E8")
], begin: Alignment.topLeft, end: Alignment.bottomRight),
gradient: LinearGradient(
colors: [AppColors.nearlyDarkBlue, HexColor("#6F56E8")],
begin: Alignment.topLeft,
end: Alignment.bottomRight),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8.0),
bottomLeft: Radius.circular(8.0),
Expand Down Expand Up @@ -117,13 +118,18 @@ class WorkoutView extends StatelessWidget {
blurRadius: 8.0),
],
),
child: Padding(
padding: const EdgeInsets.all(0.0),
child: Icon(
Icons.read_more,
color: HexColor("#6F56E8"),
size: 44,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(0.0),
child: Icon(
Icons.read_more,
color: HexColor("#6F56E8"),
size: 44,
),
),
onTap: () {
Navigator.pushNamed(context, Routes.news);
},
),
)
],
Expand Down
3 changes: 3 additions & 0 deletions lib/utils/routes/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:farmacare/ui/community/community.dart';
import 'package:farmacare/ui/delivery/delivery.dart';
import 'package:farmacare/ui/drugs/drugs.dart';
import 'package:farmacare/ui/feedback/feedback.dart';
import 'package:farmacare/ui/news/news.dart';
import 'package:farmacare/ui/home/zzHome.dart';
import 'package:farmacare/ui/home/navigation_home_screen.dart';
import 'package:farmacare/ui/login/login.dart';
Expand Down Expand Up @@ -52,6 +53,7 @@ class Routes {
static const String doctorDetail = '/appointment/detail';
static const String community = '/community';
static const String feedback = '/feedback';
static const String news = '/news';

static final routes = <String, WidgetBuilder>{
splash: (BuildContext context) => SplashScreen(),
Expand All @@ -78,6 +80,7 @@ class Routes {
},
community: (BuildContext context) => CommunityScreen(),
feedback: (BuildContext context) => FeedbackScreen(),
news: (BuildContext context) => NewsScreen(),
// reply: (BuildContext context) => ReplyApp(),
// replyHome: (BuildContext context) => ReplyPage(),
};
Expand Down

0 comments on commit 3a234b7

Please sign in to comment.