Skip to content

Instantly share code, notes, and snippets.

@z-ohnami
Last active March 16, 2022 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save z-ohnami/b1d28f5ae174e9cd3cf525d6ca779cb3 to your computer and use it in GitHub Desktop.
Save z-ohnami/b1d28f5ae174e9cd3cf525d6ca779cb3 to your computer and use it in GitHub Desktop.
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