Last active
December 30, 2020 16:53
-
-
Save patryk-sredzinski/a5cb34533edae8e860351a628358b050 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(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: Scaffold( | |
body: Center( | |
child: MyWidget(), | |
), | |
), | |
); | |
} | |
} | |
class MyWidget extends StatelessWidget { | |
final lorem = | |
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam euismod quam ut orci semper, quis convallis libero venenatis. Aliquam erat volutpat. Curabitur imperdiet tellus velit, ac tincidunt urna pellentesque ut.'; | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
width: 200, | |
height: 95, | |
color: Colors.green, | |
child: Text(lorem, overflow: TextOverflow.ellipsis, maxLines: 10), | |
); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment