-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
111 additions
and
66 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export 'package:flutter/foundation.dart'; | ||
export 'package:flutter/material.dart'; | ||
export 'package:flutter/services.dart'; | ||
|
||
Future<void> webOnlyInitializePlatform() async {} | ||
|
||
final Window window = Window(); | ||
|
||
class Window { | ||
void open(String url, String name) {} | ||
_Navigator get navigator => _Navigator(); | ||
} | ||
|
||
class _Navigator { | ||
_Clipboard get clipboard => _Clipboard(); | ||
} | ||
|
||
class _Clipboard { | ||
Future<void> writeText(String text) async {} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,4 @@ | ||
// For web | ||
export 'dart:html' show window; | ||
|
||
export 'package:flutter_web/material.dart'; | ||
export 'package:flutter_web_ui/ui.dart' show webOnlyInitializePlatform; | ||
|
||
////For native | ||
//export 'package:flutter/foundation.dart'; | ||
//export 'package:flutter/material.dart'; | ||
//export 'package:flutter/services.dart'; | ||
// | ||
//Future<void> webOnlyInitializePlatform() async {} | ||
// | ||
//final Window window = Window(); | ||
// | ||
//class Window { | ||
// void open(String url, String name) {} | ||
//} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import 'dart:io'; | ||
|
||
Future<void> main() async { | ||
if (isWebConfig()) { | ||
await File(yaml).rename(yamlWeb); | ||
await File(yamlDesktop).rename(yaml); | ||
await File(material).rename(materialWeb); | ||
await File(materialDesktop).rename(material); | ||
} else { | ||
await File(yaml).rename(yamlDesktop); | ||
await File(yamlWeb).rename(yaml); | ||
await File(material).rename(materialDesktop); | ||
await File(materialWeb).rename(material); | ||
} | ||
} | ||
|
||
bool isWebConfig() => exists(yamlDesktop); | ||
|
||
bool exists(String path) => path != null && File(path).existsSync(); | ||
|
||
const yamlDesktop = './pubspec_desktop.yaml'; | ||
const yamlWeb = './pubspec_web.yaml'; | ||
const yaml = './pubspec.yaml'; | ||
|
||
const materialDesktop = './lib/shared/material_desktop.txt'; | ||
const materialWeb = './lib/shared/material_web.txt'; | ||
const material = './lib/shared/material_import.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: animation_cheat_page | ||
description: Presentations made with Flutter | ||
|
||
environment: | ||
sdk: ">=2.3.0-dev.0.3.flutter-c46deebfb6 <3.0.0" | ||
|
||
|
||
dependencies: | ||
flutter: | ||
sdk: flutter | ||
flutter_localizations: | ||
sdk: flutter | ||
|
||
http: ^0.12.0+1 | ||
|
||
dev_dependencies: | ||
flutter_test: | ||
sdk: flutter | ||
flutter_driver: | ||
sdk: flutter | ||
|
||
|
||
flutter: | ||
|
||
uses-material-design: true | ||
assets: | ||
- assets/ | ||
|
||
fonts: | ||
- family: Roboto | ||
fonts: | ||
- asset: fonts/Roboto/Roboto-Thin.ttf | ||
weight: 100 | ||
- asset: fonts/Roboto/Roboto-Light.ttf | ||
weight: 300 | ||
- asset: fonts/Roboto/Roboto-Regular.ttf | ||
weight: 400 | ||
- asset: fonts/Roboto/Roboto-Medium.ttf | ||
weight: 500 | ||
- asset: fonts/Roboto/Roboto-Bold.ttf | ||
weight: 700 | ||
- asset: fonts/Roboto/Roboto-Black.ttf | ||
weight: 900 | ||
- family: Montserrat | ||
fonts: | ||
- asset: fonts/Monoserrat/Montserrat-Thin.ttf | ||
weight: 100 | ||
- asset: fonts/Monoserrat/Montserrat-Light.ttf | ||
weight: 300 | ||
- asset: fonts/Monoserrat/Montserrat-Regular.ttf | ||
weight: 400 | ||
- asset: fonts/Monoserrat/Montserrat-Medium.ttf | ||
weight: 500 | ||
- asset: fonts/Monoserrat/Montserrat-Bold.ttf | ||
weight: 700 | ||
- asset: fonts/Monoserrat/Montserrat-Black.ttf | ||
weight: 900 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
dart ./lib/tools/toggle.dart | ||
flutter packages get |