more evolved mockup
This commit is contained in:
40
lib/modules/destination_card.dart
Normal file
40
lib/modules/destination_card.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
|
||||
class DestinationCard extends StatefulWidget {
|
||||
final String title;
|
||||
final String description;
|
||||
final String image;
|
||||
bool visited;
|
||||
|
||||
@override
|
||||
_DestinationCardState createState() => _DestinationCardState();
|
||||
|
||||
|
||||
DestinationCard(this.title, this.description, this.image, this.visited);
|
||||
|
||||
Widget build() {
|
||||
return Card(
|
||||
child: ListTile(
|
||||
leading: Icon(Icons.location_on),
|
||||
title: Text(title),
|
||||
subtitle: Text(description),
|
||||
onTap: () {
|
||||
// Navigator.pushNamed(context, '/destination');
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class _DestinationCardState extends State<DestinationCard> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Card();
|
||||
}
|
||||
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
import 'package:fast_network_navigation/modules/destination_card.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
|
||||
List<Widget> loadDestinations() {
|
||||
List<Widget> cities = [
|
||||
singleDestination(
|
||||
|
31
lib/structs/destination.dart
Normal file
31
lib/structs/destination.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
class Destination {
|
||||
final double latitude;
|
||||
final double longitude;
|
||||
final String name;
|
||||
final String description;
|
||||
final DestinationType type;
|
||||
final Duration duration;
|
||||
final bool visited;
|
||||
|
||||
Destination({
|
||||
required this.latitude,
|
||||
required this.longitude,
|
||||
required this.name,
|
||||
required this.description,
|
||||
required this.type,
|
||||
required this.duration,
|
||||
required this.visited,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
class DestinationType {
|
||||
final String name;
|
||||
final String description;
|
||||
|
||||
DestinationType({
|
||||
required this.name,
|
||||
required this.description,
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user