This file contains 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/cupertino.dart'; | |
void main() { | |
runApp( | |
CupertinoApp( | |
theme: CupertinoThemeData( | |
brightness: Brightness.light, | |
), | |
home: CupertinoPageScaffold( | |
child: Stack( |
This file contains 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/cupertino.dart'; | |
void main() { | |
runApp( | |
CupertinoApp( | |
home: CupertinoPageScaffold( | |
child: CupertinoListSection( | |
children: <Widget>[ | |
CupertinoListTile(title: Text('Foo')), | |
CupertinoListTile(title: Text('Bar')), |
This file contains 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/cupertino.dart'; | |
void main() { | |
runApp( | |
CupertinoApp( | |
home: CupertinoPageScaffold( | |
navigationBar: CupertinoNavigationBar( | |
middle: Column(children: [ | |
Text('My page'), | |
CupertinoSlidingSegmentedControl<int>( |
This file contains 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/cupertino.dart'; | |
void main() { | |
runApp( | |
CupertinoApp( | |
home: CupertinoPageScaffold( | |
navigationBar: CupertinoNavigationBar( | |
trailing: CupertinoButton( | |
child: Text('Close'), | |
onPressed: () {}, |
This file contains 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/cupertino.dart'; | |
void main() { | |
runApp( | |
const CupertinoApp( | |
home: CupertinoPageScaffold( | |
navigationBar: CupertinoNavigationBar(), | |
child: Text('Hello world'), | |
), | |
), |
This file contains 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
Center() | |
<| DecoratedBox( | |
BoxDecoration( | |
color: Colors.white, | |
borderRadius: BorderRadius.circular(20), | |
boxShadow: [ | |
BoxShadow( | |
color: Colors.grey.withValues(alpha: 0.5), | |
offset: Offset(3, 3) | |
) |
This file contains 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
Center() | |
<| DecoratedBox( | |
decoration: BoxDecoration( | |
color: Colors.white, | |
borderRadius: BorderRadius.circular(20), | |
boxShadow: [ | |
BoxShadow( | |
color: Colors.grey.withValues(alpha: 0.5), | |
offset: Offset(3, 3) | |
) |
This file contains 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
#include <flutter/dart_project.h> | |
#include <flutter/flutter_view_controller.h> | |
#include <flutter/generated_plugin_registrant.h> | |
#include <windows.h> | |
#include "flutter_window.h" | |
#include "utils.h" | |
int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, | |
_In_ wchar_t *command_line, _In_ int show_command) { |
This file contains 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
class Key {} | |
class Size {} | |
class Widget {} | |
// Decorator uses Dart callable magic | |
// https://dart.dev/language/callable-objects | |
class SizedBoxDecorator { | |
SizedBoxDecorator(this.child); | |
final Widget child; |
This file contains 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 'dart:convert'; | |
void main() { | |
String text = "This string will be base64 encoded!"; | |
print(base64Encode(utf8.encode(text))); | |
} |
NewerOlder