Flutter Fixes etc
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,85 +1,12 @@
|
||||
library font_awesome_flutter;
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
/// [IconData] for a font awesome brand icon from a code point
|
||||
///
|
||||
/// Code points can be obtained from fontawesome.com
|
||||
class IconDataBrands extends IconData {
|
||||
const IconDataBrands(int codePoint)
|
||||
: super(
|
||||
codePoint,
|
||||
fontFamily: 'FontAwesomeBrands',
|
||||
fontPackage: 'font_awesome_flutter',
|
||||
);
|
||||
}
|
||||
|
||||
/// [IconData] for a font awesome solid icon from a code point
|
||||
///
|
||||
/// Code points can be obtained from fontawesome.com
|
||||
class IconDataSolid extends IconData {
|
||||
const IconDataSolid(int codePoint)
|
||||
: super(
|
||||
codePoint,
|
||||
fontFamily: 'FontAwesomeSolid',
|
||||
fontPackage: 'font_awesome_flutter',
|
||||
);
|
||||
}
|
||||
|
||||
/// [IconData] for a font awesome regular icon from a code point
|
||||
///
|
||||
/// Code points can be obtained from fontawesome.com
|
||||
class IconDataRegular extends IconData {
|
||||
const IconDataRegular(int codePoint)
|
||||
: super(
|
||||
codePoint,
|
||||
fontFamily: 'FontAwesomeRegular',
|
||||
fontPackage: 'font_awesome_flutter',
|
||||
);
|
||||
}
|
||||
|
||||
/// [IconData] for a font awesome light icon from a code point. Only works if
|
||||
/// light icons (font awesome pro) have been installed.
|
||||
///
|
||||
/// Code points can be obtained from fontawesome.com
|
||||
class IconDataLight extends IconData {
|
||||
const IconDataLight(int codePoint)
|
||||
: super(
|
||||
codePoint,
|
||||
fontFamily: 'FontAwesomeLight',
|
||||
fontPackage: 'font_awesome_flutter',
|
||||
);
|
||||
}
|
||||
|
||||
/// [IconData] for a font awesome duotone icon from a code point. Only works if
|
||||
/// duotone icons (font awesome pro) have been installed.
|
||||
///
|
||||
/// Code points can be obtained from fontawesome.com. Each duotone icon consists
|
||||
/// of a primary [codePoint] and a [secondary].
|
||||
class IconDataDuotone extends IconData {
|
||||
/// Secondary glyph of the duotone icon
|
||||
///
|
||||
/// Due to tree-shaking restraints [secondary] cannot be the codepoint itself,
|
||||
/// but has to be an [IconData] object.
|
||||
final IconData? secondary;
|
||||
|
||||
const IconDataDuotone(int codePoint, {this.secondary})
|
||||
: super(
|
||||
codePoint,
|
||||
fontFamily: 'FontAwesomeDuotone',
|
||||
fontPackage: 'font_awesome_flutter',
|
||||
);
|
||||
}
|
||||
|
||||
/// [IconData] for a font awesome thin icon from a code point. Only works if
|
||||
/// thin icons (font awesome pro, v6+) have been installed.
|
||||
///
|
||||
/// Code points can be obtained from fontawesome.com
|
||||
class IconDataThin extends IconData {
|
||||
const IconDataThin(int codePoint)
|
||||
: super(
|
||||
codePoint,
|
||||
fontFamily: 'FontAwesomeThin',
|
||||
fontPackage: 'font_awesome_flutter',
|
||||
);
|
||||
}
|
||||
// NOTE:
|
||||
// This file previously declared IconDataBrands / IconDataSolid / IconDataRegular
|
||||
// / IconDataLight / IconDataThin / IconDataDuotone as subclasses of [IconData].
|
||||
// Newer Flutter SDKs mark [IconData] as a `final class`, which can no longer be
|
||||
// extended outside its own library, so those subclasses no longer compile.
|
||||
//
|
||||
// The generated icon constants in `font_awesome_flutter.dart` now construct
|
||||
// plain `const IconData(..., fontFamily: '<FontAwesome...>', fontPackage:
|
||||
// 'font_awesome_flutter')` directly, so these helper subclasses are no longer
|
||||
// needed. Using const [IconData] literals also keeps icon tree-shaking working.
|
||||
|
||||
@@ -98,7 +98,7 @@ class _SCNNavLayoutState extends State<SCNNavLayout> {
|
||||
selectedIndex: _selectedIndex,
|
||||
onTabSelected: _onItemTapped,
|
||||
color: Theme.of(context).disabledColor,
|
||||
selectedColor: Theme.of(context).primaryColorDark,
|
||||
selectedColor: Theme.of(context).colorScheme.primary,
|
||||
notchedShape: const AutomaticNotchedShape(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.only(
|
||||
|
||||
@@ -31,7 +31,7 @@ class SCNScaffold extends StatelessWidget {
|
||||
showShare: showShare,
|
||||
onShare: onShare ?? () {},
|
||||
),
|
||||
body: child,
|
||||
body: SafeArea(child: child),
|
||||
floatingActionButton: floatingActionButton,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -69,6 +69,11 @@ class _ChannelListItemState extends State<ChannelListItem> {
|
||||
margin: EdgeInsets.fromLTRB(0, 4, 0, 4),
|
||||
shape: BeveledRectangleBorder(borderRadius: BorderRadius.circular(0)),
|
||||
color: Theme.of(context).cardTheme.color,
|
||||
child: IntrinsicHeight(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
if (widget.mode == ChannelListItemMode.Messages) {
|
||||
@@ -112,8 +117,13 @@ class _ChannelListItemState extends State<ChannelListItem> {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
if (widget.mode == ChannelListItemMode.Messages) {
|
||||
Navi.push(context, () => ChannelViewPage(channelID: widget.channel.channelID, preloadedData: (widget.channel, widget.subscription), needsReload: widget.onChannelListReloadTrigger));
|
||||
@@ -122,14 +132,13 @@ class _ChannelListItemState extends State<ChannelListItem> {
|
||||
}
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: (widget.mode == ChannelListItemMode.Messages) ? Icon(FontAwesomeIcons.solidSquareInfo, color: Theme.of(context).colorScheme.onPrimaryContainer.withAlpha(128), size: 24) : Icon(FontAwesomeIcons.solidEnvelopes, color: Theme.of(context).colorScheme.onPrimaryContainer.withAlpha(128), size: 24),
|
||||
padding: const EdgeInsets.only(left: 12, right: 16),
|
||||
child: Center(widthFactor: 1.0, child: (widget.mode == ChannelListItemMode.Messages) ? Icon(FontAwesomeIcons.solidSquareInfo, color: Theme.of(context).colorScheme.onPrimaryContainer.withAlpha(128), size: 24) : Icon(FontAwesomeIcons.solidEnvelopes, color: Theme.of(context).colorScheme.onPrimaryContainer.withAlpha(128), size: 24)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,11 @@ class KeyTokenListItem extends StatelessWidget {
|
||||
margin: EdgeInsets.fromLTRB(0, 4, 0, 4),
|
||||
shape: BeveledRectangleBorder(borderRadius: BorderRadius.circular(0)),
|
||||
color: Theme.of(context).cardTheme.color,
|
||||
child: IntrinsicHeight(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navi.push(context, () => KeyTokenViewPage(keytokenID: item.keytokenID, preloadedData: item, needsReload: needsReload));
|
||||
@@ -75,20 +80,24 @@ class KeyTokenListItem extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
Navi.push(context, () => FilteredMessageViewPage(title: item.name, alertText: 'All message sent with the key \'${item.name}\'', filter: MessageFilter(usedKeys: [item.keytokenID])));
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: Icon(FontAwesomeIcons.solidEnvelopes, color: Theme.of(context).colorScheme.onPrimaryContainer.withAlpha(128), size: 24),
|
||||
padding: const EdgeInsets.only(left: 12, right: 16),
|
||||
child: Center(widthFactor: 1.0, child: Icon(FontAwesomeIcons.solidEnvelopes, color: Theme.of(context).colorScheme.onPrimaryContainer.withAlpha(128), size: 24)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,11 @@ class SenderListItem extends StatelessWidget {
|
||||
margin: EdgeInsets.fromLTRB(0, 4, 0, 4),
|
||||
shape: BeveledRectangleBorder(borderRadius: BorderRadius.circular(0)),
|
||||
color: Theme.of(context).cardTheme.color,
|
||||
child: IntrinsicHeight(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navi.push(context, () => FilteredMessageViewPage(title: item.name, alertText: 'All message sent from \'${item.name}\'', filter: MessageFilter(senderNames: [item.name])));
|
||||
@@ -68,20 +73,24 @@ class SenderListItem extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
Navi.push(context, () => FilteredMessageViewPage(title: item.name, alertText: 'All message sent from \'${item.name}\'', filter: MessageFilter(senderNames: [item.name])));
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: Icon(FontAwesomeIcons.solidEnvelopes, color: Theme.of(context).colorScheme.onPrimaryContainer.withAlpha(128), size: 24),
|
||||
padding: const EdgeInsets.only(left: 12, right: 16),
|
||||
child: Center(widthFactor: 1.0, child: Icon(FontAwesomeIcons.solidEnvelopes, color: Theme.of(context).colorScheme.onPrimaryContainer.withAlpha(128), size: 24)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ name: simplecloudnotifier
|
||||
description: "Receive push messages"
|
||||
publish_to: 'none'
|
||||
|
||||
version: 2.2.2+544
|
||||
version: 2.2.2+552
|
||||
|
||||
environment:
|
||||
sdk: '>=3.9.0 <4.0.0'
|
||||
|
||||
Reference in New Issue
Block a user