Project 'android/hangman' was moved to 'android/org.benoitharrault.hangman'. Please update any links and bookmarks that may still have the old path.
Select Git revision
info.dart 1.76 KiB
import 'package:flutter/material.dart';
import 'package:flutter/services.dart' show Clipboard, ClipboardData;
class Info extends StatelessWidget {
static const String id = 'info';
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Informations'),
actions: [ButtonCoffee()],
),
body: SingleChildScrollView(
padding: EdgeInsets.all(10.0),
child: Text(
textoInfo,
style: TextStyle(fontSize: 18.0),
),
),
);
}
}
class ButtonCoffee extends StatelessWidget {
const ButtonCoffee({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return IconButton(
icon: Icon(Icons.free_breakfast),
onPressed: () {
showDialog(
context: context,
builder: (BuildContext context) => Scaffold(
backgroundColor: Colors.transparent,
body: Builder(
builder: (context) => DialogInfo(),
),
),
);
},
);
}
}
class DialogInfo extends StatelessWidget {
const DialogInfo({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return AlertDialog(
title: Text('Informations sur cette application'),
content: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Le jeu du pendu est un logiciel libre, sans publicité.'),
],
),
),
actions: [
FlatButton(
child: Text('Fermer'),
onPressed: () => Navigator.of(context).pop(),
)
],
);
}
}
const String textoInfo = '''
LE JEU DU PENDU
''';