Skip to content

Instantly share code, notes, and snippets.

@gazialankus
Created October 11, 2021 19:51
Show Gist options
  • Save gazialankus/52c6bd8b6d66f2fe49861707d8282d94 to your computer and use it in GitHub Desktop.
Save gazialankus/52c6bd8b6d66f2fe49861707d8282d94 to your computer and use it in GitHub Desktop.
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'),
),
],
),
),
),
),
);
}
}
@gazialankus
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment