Skip to content
Snippets Groups Projects
Select Git revision
  • d0dc9bf7ccb17858f852de6b3cb2698bf6e34617
  • master default protected
  • 44-improve-app-metadata
  • Release_0.10.2_59 protected
  • Release_0.10.1_58 protected
  • Release_0.10.0_57 protected
  • Release_0.9.2_56 protected
  • Release_0.9.1_55 protected
  • Release_0.9.0_54 protected
  • Release_0.8.0_53 protected
  • Release_0.7.0_52 protected
  • Release_0.6.0_51 protected
  • Release_0.5.3_50 protected
  • Release_0.5.2_49 protected
  • Release_0.5.1_48 protected
  • Release_0.5.0_47 protected
  • Release_0.4.1_46 protected
  • Release_0.4.0_45 protected
  • Release_0.3.1_44 protected
  • Release_0.3.0_43 protected
  • Release_0.2.1_42 protected
  • Release_0.2.0_41 protected
  • Release_0.1.19_40 protected
23 results

menu.dart

Blame
  • 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
    ''';