build static method
- BuildContext context
Returns the Widgets of this CallSection.
Implementation
static List<Widget> build(BuildContext context) {
final style = Theme.of(context).style;
return [
Headline(
headline: 'DockDecorator(Dock)',
child: SizedBox(
height: 85,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
DockDecorator(
child: Dock(
items: List.generate(5, (i) => i),
itemWidth: CallController.buttonSize,
delayed: false,
onReorder: (buttons) {},
onDragStarted: (b) {},
onDragEnded: (_) {},
onLeave: (_) {},
onWillAccept: (d) => true,
itemBuilder:
(i) => CallButtonWidget(
asset: SvgIcons.callMore,
onPressed: () {},
),
),
),
],
),
),
),
Headline(
child: Launchpad(
onWillAccept: (_) => true,
children:
List.generate(
8,
(i) => SizedBox(
width: 100,
height: 100,
child: Center(
child: CallButtonWidget(
asset: SvgIcons.callMore,
hint: 'Hint',
expanded: true,
big: true,
onPressed: () {},
),
),
),
).toList(),
),
),
const Headline(child: RaisedHand(true)),
Headlines(
children: [
(
headline: 'AnimatedParticipant(loading)',
widget: SizedBox(
width: 300,
height: 300,
child: AnimatedParticipant(
Participant(
CallMember.me(const CallMemberId(UserId('me'), null)),
user: DummyRxUser(),
),
),
),
),
(
headline: 'AnimatedParticipant',
widget: SizedBox(
width: 300,
height: 300,
child: AnimatedParticipant(
Participant(
CallMember.me(
const CallMemberId(UserId('me'), null),
isConnected: true,
),
user: DummyRxUser(),
),
),
),
),
(
headline: 'AnimatedParticipant(muted)',
widget: SizedBox(
width: 300,
height: 300,
child: AnimatedParticipant(
Participant(
CallMember.me(
const CallMemberId(UserId('me'), null),
isConnected: true,
),
user: DummyRxUser(),
),
rounded: true,
muted: true,
),
),
),
],
),
Headline(
background: style.colors.backgroundAuxiliaryLight,
child: const CallTitle(title: 'Title', state: 'State'),
),
Headline(
child: ChatInfoCard(
chat: DummyRxChat(),
onTap: () {},
duration: const Duration(seconds: 10),
subtitle: 'Subtitle',
trailing: 'Trailing',
),
),
const Headline(
headline: 'DropBox',
child: SizedBox(width: 200, height: 200, child: DropBox()),
),
Builder(
builder: (context) {
final GlobalKey key = GlobalKey();
return Headline(
headline: 'ReorderableFit',
child: SizedBox(
key: key,
width: 400,
height: 400,
child: ReorderableFit(
children: List.generate(5, (i) => i),
itemBuilder:
(i) => Container(
color: Colors.primaries[i],
child: Center(child: Text('$i')),
),
onOffset: () {
if (key.globalPaintBounds != null) {
return Offset(
-key.globalPaintBounds!.left,
-key.globalPaintBounds!.top,
);
}
return Offset.zero;
},
),
),
);
},
),
];
}