"Fossies" - the Fresh Open Source Software Archive 
Member "flutter-3.7.1/examples/api/lib/material/about/about_list_tile.0.dart" (1 Feb 2023, 2607 Bytes) of package /linux/misc/flutter-3.7.1.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Dart source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the last
Fossies "Diffs" side-by-side code changes report for "about_list_tile.0.dart":
3.3.10_vs_3.7.0.
1 // Copyright 2014 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /// Flutter code sample for [AboutListTile].
6
7 import 'package:flutter/material.dart';
8
9 void main() => runApp(const MyApp());
10
11 class MyApp extends StatelessWidget {
12 const MyApp({super.key});
13
14 static const String _title = 'Flutter Code Sample';
15
16 @override
17 Widget build(BuildContext context) {
18 return const MaterialApp(
19 title: _title,
20 home: MyStatelessWidget(),
21 );
22 }
23 }
24
25 class MyStatelessWidget extends StatelessWidget {
26 const MyStatelessWidget({super.key});
27
28 @override
29 Widget build(BuildContext context) {
30 final ThemeData theme = Theme.of(context);
31 final TextStyle textStyle = theme.textTheme.bodyMedium!;
32 final List<Widget> aboutBoxChildren = <Widget>[
33 const SizedBox(height: 24),
34 RichText(
35 text: TextSpan(
36 children: <TextSpan>[
37 TextSpan(
38 style: textStyle,
39 text: "Flutter is Google's UI toolkit for building beautiful, "
40 'natively compiled applications for mobile, web, and desktop '
41 'from a single codebase. Learn more about Flutter at '),
42 TextSpan(
43 style: textStyle.copyWith(color: theme.colorScheme.primary),
44 text: 'https://flutter.dev'),
45 TextSpan(style: textStyle, text: '.'),
46 ],
47 ),
48 ),
49 ];
50
51 return Scaffold(
52 appBar: AppBar(
53 title: const Text('Show About Example'),
54 ),
55 drawer: Drawer(
56 child: SingleChildScrollView(
57 child: SafeArea(
58 child: AboutListTile(
59 icon: const Icon(Icons.info),
60 applicationIcon: const FlutterLogo(),
61 applicationName: 'Show About Example',
62 applicationVersion: 'August 2019',
63 applicationLegalese: '\u{a9} 2014 The Flutter Authors',
64 aboutBoxChildren: aboutBoxChildren,
65 ),
66 ),
67 ),
68 ),
69 body: Center(
70 child: ElevatedButton(
71 child: const Text('Show About Example'),
72 onPressed: () {
73 showAboutDialog(
74 context: context,
75 applicationIcon: const FlutterLogo(),
76 applicationName: 'Show About Example',
77 applicationVersion: 'August 2019',
78 applicationLegalese: '\u{a9} 2014 The Flutter Authors',
79 children: aboutBoxChildren,
80 );
81 },
82 ),
83 ),
84 );
85 }
86 }