Created
October 11, 2021 19:51
-
-
Save gazialankus/52c6bd8b6d66f2fe49861707d8282d94 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'; | |
const 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: MyWidget(), | |
), | |
), | |
); | |
} | |
} | |
class MyWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return SingleChildScrollView( | |
scrollDirection: Axis.horizontal, | |
child: Row( | |
children: List.generate( | |
10, | |
(index) => Card( | |
clipBehavior: Clip.hardEdge, | |
child: Stack( | |
children: [ | |
Positioned( | |
left: 0, | |
right: 0, | |
top: 0, | |
child: Container( | |
color: Colors.red, | |
child: const Text('ishort'), | |
), | |
), | |
const Padding( | |
padding: EdgeInsets.only(top: 20.0), | |
child: Text('Hell00000000'), | |
), | |
], | |
), | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OCR'd from TarekkMA's original https://twitter.com/TarekkMA1/status/1447615751368609793