Skip to content

Instantly share code, notes, and snippets.

@hl3hl3
hl3hl3 / .gitlab-ci.yml
Last active October 31, 2019 11:46
.gitlab-ci.yml flutter project
# 官網介紹: https://about.gitlab.com/blog/2018/10/24/setting-up-gitlab-ci-for-android-projects/
# Flutter 部分參考: https://medium.com/@chima_37359/setup-gitlab-ci-in-flutter-android-project-89f6628828e8
# 映像檔
image: openjdk:8-jdk
# 定義腳本中要用的變數
variables:
ANDROID_COMPILE_SDK: "28"
ANDROID_BUILD_TOOLS: "28.0.2"
@hl3hl3
hl3hl3 / main.dart
Last active October 26, 2019 10:18
DragTarget example
DragTarget(
builder: (context, candidateData, rejectedData) {
return Container(
width: 200,
height: 200,
color: _acceptedColor,
);
},
onWillAccept: (MaterialColor data) {
debugPrint('onWillAccept()');
@hl3hl3
hl3hl3 / main.dart
Last active October 26, 2019 10:11
Draggable example
Draggable(
child: Container(
width: 100,
height: 100,
color:
Colors.orange,
),
feedback: Container(
width: 100,
height: 100,
@hl3hl3
hl3hl3 / main.dart
Last active October 26, 2019 10:11
Draggable example
Draggable(
// ...
onDragStarted: () {
debugPrint('onDragStarted(), 開始拖動');
},
onDraggableCanceled: (Velocity velocity, Offset offset) {
debugPrint('onDraggableCanceled(), 被放掉+沒被接受');
},
onDragCompleted: () {
debugPrint('onDragCompleted(), 被放掉+接受');