This setup is only for MacOS. I don't have a windows/linux machine to test.
cd ~
git clone https://github.com/google/flutter-desktop-embedding
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
class DotsIndicator extends AnimatedWidget { | |
const DotsIndicator({ | |
@required this.controller, | |
@required this.itemCount, | |
@required this.onPageSelected, | |
this.color = Colors.white, |
import 'package:flutter/material.dart'; | |
import 'package:flutter/widgets.dart'; | |
import 'package:vector_math/vector_math_64.dart' show radians; | |
void main() => runApp(ExampleApp()); | |
class ExampleItem { | |
static const Pineapples = ExampleItem._('Pineapples'); | |
static const Watermelons = ExampleItem._('Watermelons'); | |
static const StarFruit = ExampleItem._('Star Fruit'); |
import 'dart:math' show pi; | |
import 'package:flutter/material.dart'; | |
/// A Widget that can be configured to show funky spinning rectangles! | |
/// | |
/// ### Usage | |
/// | |
/// ``` | |
/// Spinnies( |
#include <assert.h> | |
#include <chrono> | |
#include <embedder.h> | |
#include <glfw3.h> | |
#include <iostream> | |
static_assert(FLUTTER_ENGINE_VERSION == 1, ""); | |
static const size_t kInitialWindowWidth = 800; |
library mirrors.src.decode; | |
import 'dart:mirrors' as mirrors; | |
import 'dart:convert'; | |
/// Create an object of the given type [t] from the given JSON string. | |
decode(String json, Type t) { | |
// Get deserialization descriptor for the given type. | |
// This descriptor describes how to handle the type and all its fields. | |
final TypeDesc desc = getDesc(t); |
#dart:convert example
How to pretty-print JSON using Dart.
How to display JSON in an easy-to-read (for human readers) format.
Main library: dart:convert
Main element: JsonEncoder.withIndent
Gist: https://gist.github.com/kasperpeulen/d61029fc0bc6cd104602