View run.dart
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
export 'run.io.dart' if (dart.library.html) 'run.web.dart'; |
View dart_to_dart.dart
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:analyzer/dart/ast/ast.dart'; | |
import 'package:analyzer/dart/ast/token.dart'; | |
import 'package:analyzer/src/dart/ast/ast.dart'; | |
import 'package:meta/meta.dart'; | |
/// A visitor used to write a source representation of a visited AST node (and |
View flutter_infinite_canvas.dart
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/material.dart'; | |
import 'package:vector_math/vector_math_64.dart' hide Colors; | |
void main() { | |
final controller = WidgetCanvasController([ | |
WidgetCanvasChild( | |
key: UniqueKey(), | |
offset: Offset.zero, | |
size: const Size(400, 800), | |
child: Scaffold( |
View flutter_canvas_demo.dart
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/material.dart'; | |
void main() { | |
runApp(const StoryBoardExample()); | |
} | |
class StoryBoardExample extends StatelessWidget { | |
const StoryBoardExample({super.key}); | |
@override |
View flutter_material_3_markdown_view.dart
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/material.dart'; | |
import 'package:flutter_markdown/flutter_markdown.dart'; | |
import 'package:go_router/go_router.dart'; | |
import 'package:markdown/markdown.dart' as md; | |
import 'package:url_launcher/url_launcher.dart'; | |
class MarkdownView extends StatelessWidget { | |
const MarkdownView({ | |
Key? key, | |
required this.markdown, |
View index.html
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hello World</title> | |
<link rel="stylesheet" href="https://rodydavis.github.io/material-design-lite/css/mdl.min.css"> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body class="light-theme"> | |
<button class="button filled">Button</button> | |
<script src="main.ts"></script> |
View gist:8a819c292b39826382f242415dc19b21
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
# disable sleep | |
sudo pmset -b sleep 0; sudo pmset -b disablesleep 1 | |
# re-enable sleep | |
sudo pmset -b sleep 5; sudo pmset -b disablesleep 0 |
View flutter_animations.dart
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/material.dart'; | |
import 'package:flutter/scheduler.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, |
View flutter_xcode_cloud_script.sh
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
#!/bin/sh | |
# Install CocoaPods using Homebrew. | |
brew install cocoapods | |
# Install Flutter | |
brew install --cask flutter | |
# Run Flutter doctor | |
flutter doctor |
View flutter_master_detail.dart
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/material.dart'; | |
class MasterDetail<T> extends StatefulWidget { | |
const MasterDetail({ | |
Key? key, | |
required this.listBuilder, | |
required this.detailBuilder, | |
required this.onPush, | |
this.emptyBuilder, | |
}) : super(key: key); |
NewerOlder