arna 0.0.4 arna: ^0.0.4 copied to clipboard
Arna framework and widgets for Flutter.
Arna #
Arna framework and widgets for Flutter.
Content #
Getting Started #
Add Arna as a dependency in your pubspec.yaml
dependencies:
arna: ^0.0.4
And import it
import 'package:arna/arna.dart';
Usage #
ArnaApp #
ArnaApp(
debugShowCheckedModeBanner: false,
home: Home(),
);
ArnaScaffold #
ArnaScaffold(
headerBarLeading: ArnaIconButton(
icon: Icons.add_outlined,
onPressed: () {},
),
title: "Title",
headerBarTrailing: ArnaIconButton(
icon: Icons.info_outlined,
onPressed: () {},
),
body: Container(),
);
ArnaSideScaffold #
ArnaSideScaffold(
headerBarLeading: ArnaIconButton(
icon: Icons.add_outlined,
onPressed: () {},
),
title: "Title",
headerBarTrailing: ArnaIconButton(
icon: Icons.info_outlined,
onPressed: () {},
),
items: [
NavigationItem(
title: "Dummy",
icon: Icons.info_outlined,
builder: (_) => Container(),
),
NavigationItem(
title: "Dummy",
icon: Icons.info_outlined,
builder: (_) => Container(),
),
],
);
ArnaButton #
ArnaButton(
title: "Add",
icon: Icons.add_outlined,
onPressed: () {},
);
ArnaIconButton #
ArnaIconButton(
icon: Icons.add_outlined,
onPressed: () {},
);
ArnaTextButton #
ArnaTextButton(
title: "Add",
onPressed: () {},
);
ArnaLinkedButtons #
ArnaLinkedButtons(
buttons: [
ArnaLinkedButton(
title: "Add",
icon: Icons.add_outlined,
onPressed: () {},
),
ArnaLinkedIconButton(
icon: Icons.add_outlined,
onPressed: () {},
),
ArnaLinkedTextButton(
title: "Add",
onPressed: () {},
),
],
);
ArnaCheckBox #
ArnaCheckBox(
value: _throwShotAway,
onChanged: (bool? newValue) => setState(() => _throwShotAway = newValue!),
);
ArnaCheckBoxListTile #
ArnaCheckBoxListTile(
value: _throwShotAway,
title: "Title",
subtitle: "Subtitle",
onChanged: (bool? newValue) => setState(() => _throwShotAway = newValue!),
trailingButton: ArnaIconButton(
icon: Icons.add_outlined,
onPressed: () {},
),
);
ArnaRadio #
ArnaRadio<SingingCharacter>(
value: SingingCharacter.lafayette,
groupValue: _character,
onChanged: (SingingCharacter newValue) => setState(() => _character = newValue),
);
ArnaRadioListTile #
ArnaRadioListTile<SingingCharacter>(
value: SingingCharacter.lafayette,
groupValue: _character,
title: "Title",
subtitle: "Subtitle",
onChanged: (SingingCharacter newValue) => setState(() => _character = newValue),
trailingButton: ArnaIconButton(
icon: Icons.add_outlined,
onPressed: () {},
),
);
ArnaSwitch #
ArnaSwitch(
value: _giveVerse,
onChanged: (bool newValue) => setState(() => _giveVerse = newValue),
);
ArnaSwitchListTile #
ArnaSwitchListTile(
value: _giveVerse,
title: "Title",
subtitle: "Subtitle",
onChanged: (bool newValue) => setState(() => _giveVerse = newValue),
trailingButton: ArnaIconButton(
icon: Icons.add_outlined,
onPressed: () {},
),
);
ArnaList #
ArnaList(
title: "Title",
items: [
ArnaListTile(
title: "Title 1",
subtitle: "Subtitle 1",
trailing: ArnaBadge(title: "Badge 1"),
onTap: () {},
),
ArnaListTile(
title: "Title 2",
subtitle: "Subtitle 2",
trailing: ArnaBadge(title: "Badge 2"),
),
],
);
ArnaCard #
ArnaCard(
height: 200,
width: 200,
child: Container(),
);
ArnaBadge #
ArnaBadge(title: "Title");
ArnaDividers #
ArnaHorizontalDivider();
ArnaVerticalDivider();
ArnaSeparators #
ArnaHorizontalSeparator();
ArnaVerticalSeparator();
ArnaPopupDialog #
ArnaIconButton(
icon: Icons.info_outlined,
onPressed: () => showArnaPopupDialog(
context: context,
title: "Title",
body: Container(),
),
);
ArnaDialog #
ArnaIconButton(
icon: Icons.info_outlined,
onPressed: () => ArnaDialog(
context: context,
barrierDismissible: true,
builder: (_) => ArnaAlertDialog(
title: "Title",
message: "Message",
primary: ArnaTextButton(
title: "OK",
onPressed: Navigator.of(context).pop,
)
),
),
);