This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:nft/utils/app_route.dart'; | |
class WBehindKeyboard extends StatefulWidget { | |
const WBehindKeyboard( | |
{Key key, | |
@required this.child, | |
this.reversed = false, | |
this.keepView = true}) | |
: super(key: key); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
import 'dart:io'; | |
import 'dart:typed_data'; | |
import 'dart:ui' as ui; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:nft/services/safety/base_stateful.dart'; | |
import 'package:nft/widgets/p_appbar_transparency.dart'; | |
import 'package:path_provider/path_provider.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Draggable widget | |
class _WDraggable extends StatefulWidget { | |
const _WDraggable({Key key, this.child, this.valueChanged}) : super(key: key); | |
final Widget child; | |
final ValueChanged<Offset> valueChanged; | |
@override | |
_WDraggableState createState() => _WDraggableState(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:nft/services/app/dynamic_size.dart'; | |
import 'package:nft/services/safety/base_stateful.dart'; | |
import 'package:nft/utils/app_extension.dart'; | |
import 'package:simple_animations/simple_animations.dart'; | |
/// OToast.I.showCustomToast(context, 'hello'); | |
class OToast with DynamicSize { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppTextEditingController extends TextEditingController { | |
@override | |
TextSpan buildTextSpan({TextStyle style, bool withComposing}) { | |
final TextSpan textSpan = | |
super.buildTextSpan(style: style, withComposing: withComposing); | |
if (text != null) { | |
return _buildEmojiTextSpan(text); | |
} | |
return textSpan; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Insert text to TextField | |
void insertText(String insert, TextEditingController controller) { | |
final int cursorPos = controller.selection.base.offset; | |
controller.value = controller.value.copyWith( | |
text: controller.text.replaceRange(max(cursorPos, 0), max(cursorPos, 0), insert), | |
selection: TextSelection.fromPosition(TextPosition(offset: max(cursorPos, 0) + insert.length)) | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
import 'package:nft/utils/app_extension.dart'; | |
import 'package:nft/utils/app_style.dart'; | |
// showCupertinoModalPopup<void>( | |
// context: context, | |
// builder: (BuildContext context) { | |
// return WBottomActionSheet( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class WDividerLine extends StatelessWidget { | |
const WDividerLine({Key key, this.width, this.height, this.color}) | |
: super(key: key); | |
final double width; | |
final double height; | |
final Color color; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:nft/services/safety/base_stateful.dart'; | |
import 'package:flutter/material.dart'; | |
/// Use | |
/// const WChatText(text: 'hello:heart.86ac068::smile.48f82f2::fire.9f77c64:'), | |
class WChatText extends StatefulWidget { | |
const WChatText({Key key, @required this.text}) : super(key: key); | |
final String text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash -e | |
_INFOPLIST_DIR="ios/Runner/Info.plist" | |
_PACKAGE_VERSION=$(cat pubspec.yaml | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[: ']//g'') | |
# Set BUILD_NUMBER to the value 1 only if it is unset. | |
: ${BUILD_NUMBER=$(expr $(git log -1 --pretty=format:%ct) / 3600)} | |
# Update plist with new values |