Skip to content

Commit

Permalink
updated almost all packages + flutter 5.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
tibfox committed Jul 27, 2022
1 parent ab34709 commit 54438d8
Show file tree
Hide file tree
Showing 6 changed files with 206 additions and 150 deletions.
7 changes: 1 addition & 6 deletions lib/bloc/thirdpartyloader/thirdpartyloader_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,7 @@ class ThirdPartyMetadataRepositoryImpl implements ThirdPartyMetadataRepository {

var channelabout = await yt.channels.getAboutPage(channelId);

if (channelabout.description != null) {
String cd = channelabout.description!;
return cd.contains(code);
} else {
return false;
}
return channelabout.description.contains(code);
} catch (e) {
print(e.toString());
throw Exception();
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/startup/OnboardingJourney/OnboardingJourney.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class _OnboardingJourneyState extends State<OnboardingJourney> {
var pageDecoration = PageDecoration(
titleTextStyle: Theme.of(context).textTheme.headline1!,
bodyTextStyle: Theme.of(context).textTheme.bodyText1!,
descriptionPadding: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 8.0),
// descriptionPadding: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 8.0),
pageColor: globalBlue,
imagePadding: EdgeInsets.only(top: 20.h),
imageFlex: 3,
Expand Down Expand Up @@ -70,7 +70,7 @@ class _OnboardingJourneyState extends State<OnboardingJourney> {
onDone: () => widget.journeyDoneCallback(),
//onSkip: () => _onIntroEnd(context), // You can override onSkip callback
showSkipButton: true,
skipFlex: 0,
// skipFlex: 0,
nextFlex: 0,
//rtl: true, // Display as right-to-left
skip: Text(
Expand Down
41 changes: 22 additions & 19 deletions lib/ui/widgets/PinPadWidget.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:dtube_go/style/ThemeData.dart';
import 'package:flutter/material.dart';
import 'package:pinput/pin_put/pin_put.dart';
import 'package:pinput/pinput.dart';

class PinPadWidget extends StatelessWidget {
PinPadWidget(
Expand All @@ -23,29 +23,32 @@ class PinPadWidget extends StatelessWidget {
);
@override
Widget build(BuildContext context) {
return PinPut(
return Pinput(
key: key,
fieldsCount: 5,
withCursor: true,
textStyle: TextStyle(fontSize: 25.0, color: globalAlmostWhite),
eachFieldWidth: 40.0,
eachFieldHeight: 55.0,
onSubmit: (String pin) => print(pin),

length: 5,
defaultPinTheme: PinTheme(
width: 56,
height: 56,
textStyle: TextStyle(fontSize: 25.0, color: globalAlmostWhite),
decoration: BoxDecoration(
border: Border.all(color: Color.fromRGBO(234, 239, 243, 1)),
borderRadius: BorderRadius.circular(20),
),
),

showCursor: true,

// eachFieldWidth: 40.0,
// eachFieldHeight: 55.0,
onSubmitted: (String pin) => print(pin),
focusNode: _pinPutFocusNode,
controller: _pinPutController,
autofocus: requestFocus,
submittedFieldDecoration: pinPutDecoration,
selectedFieldDecoration: pinPutDecoration,
followingFieldDecoration: pinPutDecoration,
submittedPinTheme: PinTheme(decoration: pinPutDecoration),
focusedPinTheme: PinTheme(decoration: pinPutDecoration),
followingPinTheme: PinTheme(decoration: pinPutDecoration),
pinAnimationType: PinAnimationType.fade,
inputDecoration: InputDecoration(
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
errorBorder: InputBorder.none,
disabledBorder: InputBorder.none,
counterText: "",
),

//keyboardType: TextInputType.name,
//useNativeKeyboard: true,
Expand Down
26 changes: 14 additions & 12 deletions lib/utils/imageCropper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
import 'package:image_cropper/image_cropper.dart';

Future<File> cropImage(File currentThumbnail) async {
File? croppedFile = await ImageCropper.cropImage(
CroppedFile? croppedFile = await ImageCropper().cropImage(
sourcePath: currentThumbnail.path,
aspectRatioPresets: Platform.isAndroid
? [
Expand All @@ -25,18 +25,20 @@ Future<File> cropImage(File currentThumbnail) async {
// CropAspectRatioPreset.ratio7x5,
CropAspectRatioPreset.ratio16x9
],
androidUiSettings: AndroidUiSettings(
toolbarTitle: 'Cropper',
toolbarColor: Colors.deepOrange,
toolbarWidgetColor: globalAlmostWhite,
initAspectRatio: CropAspectRatioPreset.ratio16x9,
hideBottomControls: false,
lockAspectRatio: true),
iosUiSettings: IOSUiSettings(
title: 'Cropper',
));
uiSettings: [
AndroidUiSettings(
toolbarTitle: 'Cropper',
toolbarColor: Colors.deepOrange,
toolbarWidgetColor: globalAlmostWhite,
initAspectRatio: CropAspectRatioPreset.ratio16x9,
hideBottomControls: false,
lockAspectRatio: true),
IOSUiSettings(
title: 'Cropper',
)
]);
if (croppedFile != null) {
return croppedFile;
return File(croppedFile.path);
} else {
return currentThumbnail;
}
Expand Down
Loading

0 comments on commit 54438d8

Please sign in to comment.