Skip to content

Instantly share code, notes, and snippets.

@sepisoad
Last active December 15, 2019 08:47
Show Gist options
  • Save sepisoad/8e146a29feeb268cb183d898046908a4 to your computer and use it in GitHub Desktop.
Save sepisoad/8e146a29feeb268cb183d898046908a4 to your computer and use it in GitHub Desktop.
flutter-layout-stack
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
static const String _title = 'Flutter Code Sample';
@override
Widget build(BuildContext context) {
return MaterialApp(
title: _title,
home: Scaffold(
body: Column(
children: <Widget>[
Stack(
alignment: Alignment.bottomCenter,
children: <Widget>[
Image.network('https://cutt.ly/ue6Msns'),
Positioned(
top: 25,
left: 25,
child: Opacity(
opacity: 0.75,
child: LimitedBox(
maxWidth: 35,
maxHeight: 35,
child: Material(
color: Colors.red[100],
borderRadius: BorderRadius.all(Radius.circular(30)),
child: IconButton(
iconSize: 15,
icon: Icon(Icons.volume_mute),
onPressed: () => print('')
)
),
)
)
),
Container(
padding: EdgeInsets.all(15),
child: Material(
color: Colors.white54,
elevation: 4.0,
borderRadius: BorderRadius.all(Radius.circular(6.0)),
child: Wrap(
spacing: 15,
direction: Axis.horizontal,
children: <Widget>[
IconButton(
icon: Icon(Icons.skip_previous),
onPressed: () => print("")),
IconButton(
icon: Icon(Icons.play_arrow),
onPressed: () => print("")),
IconButton(
icon: Icon(Icons.skip_next),
onPressed: () => print(""))
],
),
),
)
],
),
Text("hello")
],
)));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment