-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update bake script
- Loading branch information
Showing
34 changed files
with
372 additions
and
314 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
114 changes: 114 additions & 0 deletions
114
notes/flutter_core/lib/notes/x.note_inside/note_api_thinking/format1.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:note_dart/note.dart'; | ||
|
||
build(BuildContext context, Pen print) { | ||
print(Layer(title: const Text("布局"), style: const ContentLayout(maxColumn: 3), () { | ||
print(Layer(title: const Text("box布局"), style: const ContentLayout(maxColumn: 3), () { | ||
print(Layer(title: const Text("box布局 box布局.Column vs ListView"), style: const ContentLayout(maxColumn: 3), () { | ||
print(const Text("")); | ||
})); | ||
})); | ||
print(Layer(title: const Text("slaver布局"), style: const ContentLayout(maxColumn: 3), () { | ||
print(const Text("")); | ||
})); | ||
})); | ||
|
||
|
||
|
||
Layer(title: const Text("slaver布局"), style: const ContentLayout(maxColumn: 3), () { | ||
Layer(title: const Text("box布局 box布局.Column vs ListView"), style: const ContentLayout(maxColumn: 3), () { | ||
print(const Text("")); | ||
}); | ||
Layer(title: const Text("box布局 box布局.Column vs ListView"), style: const ContentLayout(maxColumn: 3), () { | ||
print(const Text("")); | ||
}); | ||
}); | ||
|
||
|
||
|
||
} | ||
|
||
void noUse(Pen print) { | ||
var i = 1; | ||
print.runInCurrentCell((print) { | ||
print(i); | ||
}); | ||
|
||
print.level( | ||
title: const Text("1"), | ||
style: const ContentLayout( | ||
maxColumn: 3, | ||
), () { | ||
print(const Text("2")); | ||
}); | ||
|
||
{ | ||
// ignore: unused_element | ||
void x({Text title = const Text("ss")}) { | ||
// 特殊语句 | ||
print.runInCurrentCell((print) { | ||
print(i); | ||
}); | ||
} | ||
|
||
(); | ||
|
||
group(const Text("ss"), () { | ||
// 特殊语句 | ||
print.runInCurrentCell((print) { | ||
print(i); | ||
}); | ||
}); | ||
print.level( | ||
title: const Text("布局"), | ||
style: const ContentLayout( | ||
maxColumn: 3, | ||
), | ||
null)(() { | ||
print.level(title: const Text("box布局"), style: const ContentLayout(maxColumn: 3), null)(() { | ||
print.level(title: const Text("box布局.Column vs ListView"), style: const ContentLayout(maxColumn: 3), null)(() { | ||
print(const Text("")); | ||
}); | ||
}); | ||
print.level(null, title: const Text("slaver布局"), style: const ContentLayout(maxColumn: 3))(() { | ||
print(const Text("")); | ||
}); | ||
}); | ||
} | ||
} | ||
|
||
void group(Text text, Null Function() param1) {} | ||
|
||
extension X on Pen { | ||
XX level(Function()? block, {Text title = const Text(""), ContentLayout style = const ContentLayout()}) { | ||
return XX(block, title: title, style: style); | ||
} | ||
} | ||
|
||
class Layer extends StatelessWidget { | ||
Layer(dynamic block, {super.key, Pen? print, Text title = const Text(""), Widget? textBox, ContentLayout style = const ContentLayout(), List<Widget> children = const <Widget>[]}) { | ||
if (print != null) print(this); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
// TODO: implement build | ||
throw UnimplementedError(); | ||
} | ||
} | ||
|
||
class XX { | ||
Function()? block; | ||
Text title; | ||
ContentLayout style; | ||
|
||
XX(this.block, {required this.title, required this.style}); | ||
|
||
call(Function() block) {} | ||
} | ||
|
||
class ContentLayout { | ||
final int maxColumn; | ||
|
||
const ContentLayout({this.maxColumn = 1}); | ||
} |
Oops, something went wrong.