This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class CustomToggle extends StatefulWidget { | |
const CustomToggle({this.activeIndex = 1, @required this.items, this.onChanged}); | |
final int activeIndex; | |
final List<String> items; | |
final Function(int) onChanged; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from pyppeteer import launch | |
async def main(): | |
browser = await launch({ "headless": True, "ignoreHTTPSErrors": True, "dumpio": True }) | |
page = await browser.newPage() | |
await page.goto('home_url', {"waitUntil": "networkidle0"}) | |
await page.evaluate('''() => { | |
localStorage.setItem('accessToken', 'token'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
theme: ThemeData( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return Scaffold( | |
appBar: AppBar( | |
title: Text(widget.title), | |
), | |
body: SingleChildScrollView( | |
child: ListView( | |
children: const [ | |
Text("hello user") | |
], | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return Scaffold( | |
appBar: AppBar( | |
title: Text(widget.title), | |
), | |
body: SingleChildScrollView( | |
child: Column( | |
children: const [ | |
Text("hello user") | |
], | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return Scaffold( | |
appBar: AppBar( | |
title: Text(widget.title), | |
), | |
body: SingleChildScrollView( | |
child: ListView( | |
shrinkWrap: true, | |
children: const [ | |
Text("hello user") | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return Scaffold( | |
appBar: AppBar( | |
title: Text(widget.title), | |
), | |
body: CustomScrollView( | |
slivers: [ | |
SliverList(delegate: SliverChildBuilderDelegate( | |
(context, index) { | |
return Text("hello user"); | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Paint paint = Paint() | |
..shader = Shader.linearGradient( | |
colors: [Colors.red, Colors.blue], | |
begin: Alignment.topLeft, | |
end: Alignment.bottomRight, | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CustomPaint( | |
painter: MyPainter(paint), | |
child: Container(), | |
); |