upgraded pub things

This commit is contained in:
Kima 2024-06-20 12:06:50 +02:00
parent fd1b15df77
commit bc8eb1910e
5 changed files with 161 additions and 91 deletions

View File

@ -6,10 +6,9 @@ import 'package:share_plus/share_plus.dart';
class ShareHelper {
static Future<void> shareText(String text, {String? subject}) =>
Share.share(text, subject: subject);
// ignore: deprecated_member_use
static Future<void> shareFile(String path, {String? text, String? subject}) =>
// ignore: deprecated_member_use
Share.shareFiles([path], text: text, subject: subject);
Share.shareXFiles([XFile(path)], text: text, subject: subject);
static Future<void> shareAttachment(Attachment attachment,
{required BuildContext context}) async {

View File

@ -39,7 +39,7 @@ dependencies:
# ref: master
path_provider: ^2.0.2
permission_handler: ^11.0.1
share_plus: ^7.0.2
share_plus: ^9.0.0
connectivity_plus: ^5.0.2
flutter_displaymode: ^0.6.0
quick_actions: ^1.0.1
@ -64,15 +64,15 @@ dependencies:
image_picker: ^1.0.7
animations: ^2.0.1
background_fetch: ^1.1.5
flutter_local_notifications: ^16.2.0
package_info_plus: ^5.0.1
flutter_local_notifications: ^17.1.2
package_info_plus: ^8.0.0
screenshot: ^3.0.0
flutter_staggered_grid_view: ^0.7.0
sqflite_common_ffi_web: ^0.4.0
image_crop:
git:
url: https://github.com/kimaah/image_crop.git
googleapis: ^12.0.0
googleapis: ^13.2.0
google_sign_in: ^6.2.1
extension_google_sign_in_as_googleapis_auth: ^2.0.12
maps_launcher: ^2.2.0
@ -84,7 +84,7 @@ dependencies:
flutter_portal: ^1.1.4
dev_dependencies:
flutter_lints: ^3.0.1
flutter_lints: ^4.0.0
flutter_launcher_icons: "^0.13.1"
flutter_native_splash: "^2.3.10"
sqflite_common_ffi: ^2.0.0+3

View File

@ -228,22 +228,32 @@ class GradeGraphState extends State<GradeGraph> {
preventCurveOverShooting: false,
spots: subjectSpots,
isCurved: true,
colors: averageColors.reversed.toList(),
// colors: averageColors.reversed.toList(),
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: averageColors.reversed.toList(),
),
barWidth: 6,
curveSmoothness: 0.2,
isStrokeCapRound: true,
dotData: FlDotData(show: false),
dotData: const FlDotData(show: false),
belowBarData: BarAreaData(
show: true,
colors: [
averageColor.withOpacity(0.7),
averageColor.withOpacity(0.3),
averageColor.withOpacity(0.2),
averageColor.withOpacity(0.1),
],
gradientColorStops: [0.1, 0.6, 0.8, 1],
gradientFrom: const Offset(0, 0),
gradientTo: const Offset(0, 1),
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
averageColor.withOpacity(0.7),
averageColor.withOpacity(0.3),
averageColor.withOpacity(0.2),
averageColor.withOpacity(0.1),
],
stops: const [0.1, 0.6, 0.8, 1],
),
// gradientColorStops: [0.1, 0.6, 0.8, 1],
// gradientFrom: const Offset(0, 0),
// gradientTo: const Offset(0, 1),
),
),
if (ghostData.isNotEmpty && ghostSpots.isNotEmpty)
@ -251,28 +261,41 @@ class GradeGraphState extends State<GradeGraph> {
preventCurveOverShooting: false,
spots: ghostSpots,
isCurved: true,
colors: [AppColors.of(context).text],
color: AppColors.of(context).text,
barWidth: 6,
curveSmoothness: 0.2,
isStrokeCapRound: true,
dotData: FlDotData(show: false),
dotData: const FlDotData(show: false),
belowBarData: BarAreaData(
show: true,
colors: [
AppColors.of(context).text.withOpacity(0.7),
AppColors.of(context).text.withOpacity(0.3),
AppColors.of(context).text.withOpacity(0.2),
AppColors.of(context).text.withOpacity(0.1),
],
gradientColorStops: [0.1, 0.6, 0.8, 1],
gradientFrom: const Offset(0, 0),
gradientTo: const Offset(0, 1),
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
AppColors.of(context)
.text
.withOpacity(0.7),
AppColors.of(context)
.text
.withOpacity(0.3),
AppColors.of(context)
.text
.withOpacity(0.2),
AppColors.of(context)
.text
.withOpacity(0.1),
],
stops: const [0.1, 0.6, 0.8, 1],
),
// gradientColorStops: [0.1, 0.6, 0.8, 1],
// gradientFrom: const Offset(0, 0),
// gradientTo: const Offset(0, 1),
),
),
],
minY: 1,
maxY: 5,
gridData: FlGridData(
gridData: const FlGridData(
show: true,
horizontalInterval: 1,
// checkToShowVerticalLine: (_) => false,
@ -286,8 +309,8 @@ class GradeGraphState extends State<GradeGraph> {
// ),
),
lineTouchData: LineTouchData(
touchTooltipData: LineTouchTooltipData(
tooltipBgColor: Colors.grey.shade800,
touchTooltipData: const LineTouchTooltipData(
// tooltipBgColor: Colors.grey.shade800,
fitInsideVertically: true,
fitInsideHorizontally: true,
),
@ -321,64 +344,112 @@ class GradeGraphState extends State<GradeGraph> {
),
),
titlesData: FlTitlesData(
bottomTitles: SideTitles(
showTitles: true,
reservedSize: 24,
getTextStyles: (context, value) => TextStyle(
color:
AppColors.of(context).text.withOpacity(.75),
fontWeight: FontWeight.bold,
fontSize: 14.0,
),
margin: 12.0,
getTitles: (value) {
var format = DateFormat(
"MMM", I18n.of(context).locale.toString());
bottomTitles: AxisTitles(
sideTitles: SideTitles(
showTitles: true,
reservedSize: 24,
getTitlesWidget: (value, meta) {
if (value == meta.max || value == meta.min) {
return Container();
}
String title = format
.format(DateTime(0, value.floor() % 12))
.replaceAll(".", "");
title =
title.substring(0, min(title.length, 4));
var format = DateFormat("MMM",
I18n.of(context).locale.toString());
return title.toUpperCase();
},
interval: () {
List<Grade> tData =
ghostData.isNotEmpty ? ghostData : data;
tData.sort((a, b) =>
a.writeDate.compareTo(b.writeDate));
return ghostData.isNotEmpty
? 3.0
: tData.first.writeDate
.add(const Duration(days: 120))
.isBefore(tData.last.writeDate)
? 2.0
: 2.5;
}(),
checkToShowTitle: (double minValue,
double maxValue,
SideTitles sideTitles,
double appliedInterval,
double value) {
if (value == maxValue || value == minValue) {
return false;
}
return true;
},
),
leftTitles: SideTitles(
showTitles: true,
interval: 1.0,
getTextStyles: (context, value) => TextStyle(
color: AppColors.of(context).text,
fontWeight: FontWeight.bold,
fontSize: 18.0,
String title = format
.format(DateTime(0, value.floor() % 12))
.replaceAll(".", "");
title =
title.substring(0, min(title.length, 4));
return Padding(
padding: const EdgeInsets.all(12.0),
child: Text(
title.toUpperCase(),
style: TextStyle(
color: AppColors.of(context)
.text
.withOpacity(.75),
fontWeight: FontWeight.bold,
fontSize: 14.0,
),
),
);
},
// getTextStyles: (context, value) => TextStyle(
// color: AppColors.of(context)
// .text
// .withOpacity(.75),
// fontWeight: FontWeight.bold,
// fontSize: 14.0,
// ),
// margin: 12.0,
// getTitles: (value) {
// var format = DateFormat("MMM",
// I18n.of(context).locale.toString());
// String title = format
// .format(DateTime(0, value.floor() % 12))
// .replaceAll(".", "");
// title =
// title.substring(0, min(title.length, 4));
// return title.toUpperCase();
// },
interval: () {
List<Grade> tData =
ghostData.isNotEmpty ? ghostData : data;
tData.sort((a, b) =>
a.writeDate.compareTo(b.writeDate));
return ghostData.isNotEmpty
? 3.0
: tData.first.writeDate
.add(const Duration(days: 120))
.isBefore(tData.last.writeDate)
? 2.0
: 2.5;
}(),
// checkToShowTitle: (double minValue,
// double maxValue,
// SideTitles sideTitles,
// double appliedInterval,
// double value) {
// if (value == maxValue || value == minValue) {
// return false;
// }
// return true;
// },
),
margin: 16,
),
rightTitles: SideTitles(showTitles: false),
topTitles: SideTitles(showTitles: false),
leftTitles: AxisTitles(
sideTitles: SideTitles(
showTitles: true,
interval: 1.0,
getTitlesWidget: (value, meta) => Padding(
padding: const EdgeInsets.all(16.0),
child: Text(
value.toInt().toString(),
style: TextStyle(
color: AppColors.of(context).text,
fontWeight: FontWeight.bold,
fontSize: 18.0,
),
),
),
// getTextStyles: (context, value) => TextStyle(
// color: AppColors.of(context).text,
// fontWeight: FontWeight.bold,
// fontSize: 18.0,
// ),
// margin: 16,
),
),
rightTitles: const AxisTitles(
sideTitles: SideTitles(showTitles: false),
),
topTitles: const AxisTitles(
sideTitles: SideTitles(showTitles: false),
),
),
),
),

View File

@ -21,7 +21,7 @@ dependencies:
flutter_feather_icons: ^2.0.0+1
provider: ^6.1.1
fl_chart: ^0.45.1
fl_chart: ^0.68.0
url_launcher: ^6.2.5
flutter_material_color_picker: ^1.1.0+2
photo_view: ^0.14.0
@ -41,7 +41,7 @@ dependencies:
flutter_svg: ^2.0.10+1
background_fetch: ^1.2.2
wtf_sliding_sheet: ^1.0.0
package_info_plus: ^5.0.1
package_info_plus: ^8.0.0
dotted_border: ^2.0.0+3
screenshot: ^3.0.0
image_gallery_saver: ^2.0.2
@ -55,7 +55,7 @@ dependencies:
auto_size_text: ^3.0.0
connectivity_plus: ^5.0.2
collection: ^1.18.0
share_plus: ^7.2.2
share_plus: ^9.0.0
image_picker: ^1.0.7
path_provider: ^2.1.2
image_crop:

@ -1 +1 @@
Subproject commit 44edca7b5ed645648cc36a8d33d5c376c40120b1
Subproject commit 8af545b5a39bfbfc25c5f2a383dcdfada018cd75