Skip to content

Instantly share code, notes, and snippets.

@preetjdp
Created May 18, 2020 11:44
Show Gist options
  • Select an option

  • Save preetjdp/5f0934685bedefdd074b5d6778956c98 to your computer and use it in GitHub Desktop.

Select an option

Save preetjdp/5f0934685bedefdd074b5d6778956c98 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.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 {
final bool condition = false;
@override
Widget build(BuildContext context) {
return CustomScrollView(
slivers: [
CupertinoSliverNavigationBar(
middle: Text("I Owe")
),
SliverPadding(
padding: const EdgeInsets.all(15.0),
sliver: SliverList(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) {
return Padding(
padding: EdgeInsets.all(15),
child: Container(height: 100, color: Colors.white));
},
childCount: 50,
),
),
)
],
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment