Advertisement
mrblab24

guide.dart(remove_guide)

Dec 31st, 2020
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 6.99 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2. import 'package:line_icons/line_icons.dart';
  3. import 'package:travel_hour/models/place.dart';
  4. import 'package:travel_hour/pages/comments.dart';
  5. import 'package:travel_hour/pages/hotel.dart';
  6. import 'package:travel_hour/pages/restaurant.dart';
  7. import 'package:travel_hour/utils/next_screen.dart';
  8. import 'package:easy_localization/easy_localization.dart';
  9.  
  10. class TodoWidget extends StatelessWidget {
  11.   final Place placeData;
  12.   const TodoWidget({Key key, @required this.placeData}) : super(key: key);
  13.  
  14.   @override
  15.   Widget build(BuildContext context) {
  16.     return Column(
  17.       mainAxisAlignment: MainAxisAlignment.center,
  18.       crossAxisAlignment: CrossAxisAlignment.start,
  19.       children: <Widget>[
  20.         Text('todo',
  21.             style: TextStyle(
  22.                 fontSize: 18,
  23.                 fontWeight: FontWeight.w800,
  24.                 )).tr(),
  25.         Container(
  26.           margin: EdgeInsets.only(top: 5, bottom: 5),
  27.           height: 3,
  28.           width: 50,
  29.          
  30.           decoration: BoxDecoration(
  31.               color: Theme.of(context).primaryColor,
  32.               borderRadius: BorderRadius.circular(40)),
  33.         ),
  34.         Container(
  35.           padding: EdgeInsets.only(top: 10, bottom: 10),
  36.           child: GridView.count(
  37.             padding: EdgeInsets.all(0),
  38.             mainAxisSpacing: 10,
  39.             crossAxisSpacing: 10,
  40.             crossAxisCount: 2,
  41.             childAspectRatio: 1.4,
  42.             shrinkWrap: true,
  43.             physics: NeverScrollableScrollPhysics(),
  44.             children: <Widget>[
  45.              
  46.               InkWell(
  47.                 child: Container(
  48.                     padding: EdgeInsets.all(15),
  49.                     decoration: BoxDecoration(
  50.                       color: Colors.orangeAccent,
  51.                       borderRadius: BorderRadius.circular(10),
  52.                     ),
  53.                     child: Column(
  54.                         crossAxisAlignment: CrossAxisAlignment.start,
  55.                         mainAxisAlignment: MainAxisAlignment.spaceBetween,
  56.                         children: <Widget>[
  57.                           Container(
  58.                             height: 50,
  59.                             width: 50,
  60.                             decoration: BoxDecoration(
  61.                                 shape: BoxShape.circle,
  62.                                 color: Colors.white,
  63.                                 boxShadow: <BoxShadow>[
  64.                                   BoxShadow(
  65.                                       color: Colors.orangeAccent[400],
  66.                                       offset: Offset(5, 5),
  67.                                       blurRadius: 2)
  68.                                 ]),
  69.                             child: Icon(
  70.                               LineIcons.hotel,
  71.                               size: 30,
  72.                             ),
  73.                           ),
  74.                           Text(
  75.                             'nearby hotels',
  76.                             style: TextStyle(
  77.                                 color: Colors.white,
  78.                                 fontWeight: FontWeight.w600,
  79.                                 fontSize: 15),
  80.                           ).tr(),
  81.                         ])),
  82.                 onTap: () => nextScreen(context, HotelPage(placeData: placeData,)),
  83.               ),
  84.               InkWell(
  85.                 child: Container(
  86.                     padding: EdgeInsets.all(15),
  87.                     decoration: BoxDecoration(
  88.                       color: Colors.pinkAccent,
  89.                       borderRadius: BorderRadius.circular(10),
  90.                     ),
  91.                     child: Column(
  92.                         crossAxisAlignment: CrossAxisAlignment.start,
  93.                         mainAxisAlignment: MainAxisAlignment.spaceBetween,
  94.                         children: <Widget>[
  95.                           Container(
  96.                             height: 50,
  97.                             width: 50,
  98.                             decoration: BoxDecoration(
  99.                                 shape: BoxShape.circle,
  100.                                 color: Colors.white,
  101.                                 boxShadow: <BoxShadow>[
  102.                                   BoxShadow(
  103.                                       color: Colors.pinkAccent[400],
  104.                                       offset: Offset(5, 5),
  105.                                       blurRadius: 2)
  106.                                 ]),
  107.                             child: Icon(
  108.                               Icons.restaurant_menu,
  109.                               size: 30,
  110.                             ),
  111.                           ),
  112.                           Text(
  113.                               'nearby restaurants',
  114.                               style: TextStyle(
  115.                                   color: Colors.white,
  116.                                   fontWeight: FontWeight.w600,
  117.                                   fontSize: 15),
  118.                             ).tr(),
  119.                          
  120.                         ])),
  121.                 onTap: () => nextScreen(context, RestaurantPage(placeData: placeData,)),
  122.               ),
  123.               InkWell(
  124.                 child: Container(
  125.                     padding: EdgeInsets.all(15),
  126.                     decoration: BoxDecoration(
  127.                       color: Colors.indigoAccent,
  128.                       borderRadius: BorderRadius.circular(10),
  129.                     ),
  130.                     child: Column(
  131.                         crossAxisAlignment: CrossAxisAlignment.start,
  132.                         mainAxisAlignment: MainAxisAlignment.spaceBetween,
  133.                         children: <Widget>[
  134.                           Container(
  135.                             height: 50,
  136.                             width: 50,
  137.                             decoration: BoxDecoration(
  138.                                 shape: BoxShape.circle,
  139.                                 color: Colors.white,
  140.                                 boxShadow: <BoxShadow>[
  141.                                   BoxShadow(
  142.                                       color: Colors.indigoAccent[400],
  143.                                       offset: Offset(5, 5),
  144.                                       blurRadius: 2)
  145.                                 ]),
  146.                             child: Icon(
  147.                               LineIcons.comments,
  148.                               size: 30,
  149.                             ),
  150.                           ),
  151.                           Text(
  152.                             'user reviews',
  153.                             style: TextStyle(
  154.                                 color: Colors.white,
  155.                                 fontWeight: FontWeight.w600,
  156.                                 fontSize: 15),
  157.                           ).tr(),
  158.                         ])),
  159.                 onTap: () => nextScreen(context, CommentsPage(collectionName: 'places', timestamp: placeData.timestamp,)),
  160.               ),
  161.             ],
  162.           ),
  163.         )
  164.       ],
  165.     );
  166.   }
  167. }
  168.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement