Skip to content

Instantly share code, notes, and snippets.

@IsmailAlamKhan
Created June 21, 2021 10:46
Show Gist options
  • Save IsmailAlamKhan/ea405c726e14a8e31ea30753a5e9fd93 to your computer and use it in GitHub Desktop.
Save IsmailAlamKhan/ea405c726e14a8e31ea30753a5e9fd93 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: MyWidget(),
),
),
);
}
}
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Card(
clipBehavior: Clip.antiAlias,
child: Stack(children: [
Image.network(
'https://images.pexels.com/photos/7903158/pexels-photo-7903158.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500'),
Positioned(
left: 0,
right: 0,
bottom: 0,
height: 150,
child: Container(
color: Colors.black45,
alignment: Alignment.topRight,
padding: EdgeInsets.all(8),
child: Text('HELLO')),
),
]),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment