Last active
March 16, 2022 02:59
-
-
Save z-ohnami/b1d28f5ae174e9cd3cf525d6ca779cb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
static const String _title = 'AppBarのtitleを改行する'; | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, | |
title: _title, | |
home: Scaffold( | |
appBar: AppBar( | |
title: Column( | |
children: const [ | |
Text( | |
'1行目のタイトル', | |
style: TextStyle( | |
color: Colors.red, | |
fontSize: 14.0, | |
), | |
), | |
Text( | |
'2行目のタイトル', | |
style: TextStyle( | |
color: Colors.white, | |
), | |
), | |
], | |
), | |
), | |
body: const Center( | |
child: Text('demo'), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment