Skip to content

Instantly share code, notes, and snippets.

@0xff00ff
Created January 14, 2021 10:49
Show Gist options
  • Save 0xff00ff/3c0acebac908ee3f702b322b181b10fc to your computer and use it in GitHub Desktop.
Save 0xff00ff/3c0acebac908ee3f702b322b181b10fc to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.dark().copyWith(scaffoldBackgroundColor: darkBlue),
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: Container(
child: MyWidget(),
height: 300,
)
),
),
);
}
}
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: [
Container(
child: Text("hello"),
height: 250,
decoration: BoxDecoration(
border: Border.all(
color: Colors.green,
width: 3,
),
),
),
Expanded(child: Text(
"world1\nworld2\nworld3\nworld4\nworld5\nworld6\nworld7\nworld8\nworld9",
overflow: TextOverflow.ellipsis,
maxLines: 6,
))
]
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment