mirror of
https://bitbucket.org/FransoletThomas/tablet-app.git
synced 2025-12-06 00:21:19 +00:00
65 lines
1.9 KiB
Dart
65 lines
1.9 KiB
Dart
import 'dart:async';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import '../../constants.dart';
|
|
|
|
class MarkerInfoWidget extends StatefulWidget {
|
|
final String title;
|
|
final String description;
|
|
final String text;
|
|
MarkerInfoWidget({this.title, this.description, this.text});
|
|
|
|
@override
|
|
_MarkerInfoWidget createState() => _MarkerInfoWidget();
|
|
}
|
|
|
|
class _MarkerInfoWidget extends State<MarkerInfoWidget> {
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Size size = MediaQuery.of(context).size;
|
|
return new AnimatedPositioned(
|
|
duration: const Duration(milliseconds: 1500),
|
|
curve: Curves.easeInOutSine,
|
|
right: 160, // TODO
|
|
top: 150, // TODO
|
|
child: Container(
|
|
width: size.width * 0.29,
|
|
height: size.height * 0.6,
|
|
margin: EdgeInsets.symmetric(vertical: 3, horizontal: 4),
|
|
decoration: BoxDecoration(
|
|
color: kBackgroundLight,
|
|
shape: BoxShape.rectangle,
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: kBackgroundSecondGrey,
|
|
spreadRadius: 0.5,
|
|
blurRadius: 1.1,
|
|
offset: Offset(0, 1.1), // changes position of shadow
|
|
),
|
|
],
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
children: [
|
|
Text(widget.title),
|
|
Text(widget.description),
|
|
Text(widget.text),
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
children: [
|
|
Text('Sub menu 1'),
|
|
Text('Sub menu 2'),
|
|
]
|
|
)
|
|
]
|
|
),
|
|
)
|
|
);
|
|
}
|
|
}
|
|
|