Skip to content

Instantly share code, notes, and snippets.

@lesliearkorful
Created June 29, 2020 01:51
Show Gist options
  • Save lesliearkorful/0f77a5295eab3a9274c25d816ad9e12d to your computer and use it in GitHub Desktop.
Save lesliearkorful/0f77a5295eab3a9274c25d816ad9e12d to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Details(),
);
}
}
class Details extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.blue,
appBar: AppBar(
elevation: 0,
backgroundColor: Colors.transparent,
),
body: Stack(
alignment: Alignment.bottomCenter,
children: [
Align(
alignment: Alignment.topCenter,
child: Container(
height: 400,
alignment: Alignment.center,
padding: EdgeInsets.all(30),
child: Image.network("https://dartpad.dartlang.org/dart-192.png"),
),
),
SafeArea(
top: false,
child: DraggableScrollableSheet(
initialChildSize: 0.5,
minChildSize: 0.5,
builder: (context, scrollController) {
return Container(
color: Colors.white,
child: ListView(
padding: EdgeInsets.only(bottom: 80),
controller: scrollController,
children: [],
),
);
},
),
),
Container(
color: Colors.white,
padding: EdgeInsets.all(10),
child: SafeArea(
top: false,
child: Row(
children: [
RaisedButton(
onPressed: () {},
child: Text("Button"),
),
],
),
),
),
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment