I hereby claim:
- I am trongdth on github.
- I am trongdth (https://keybase.io/trongdth) on keybase.
- I have a public key ASC6__RngUrr3jnMGS6dm2TjYSbIy0RWS7wwoXzHh-8hWgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Widget _buildTextField(BuildContext context) { | |
if (widget.showClearBtn) { | |
return Row( | |
children: <Widget>[ | |
Expanded( | |
flex: 9, | |
child: TextField( | |
focusNode: _focusNode, | |
style: widget.txtStyle, | |
textAlign: TextAlign.left, |
final _focusNode = new FocusNode(); | |
final TextEditingController txtController = TextEditingController(); | |
... | |
TextField( | |
focusNode: _focusNode, | |
controller: txtController, | |
), | |
... |
@override | |
Widget build(BuildContext context) { | |
return Stack( | |
children: <Widget>[ | |
Align( | |
alignment: Alignment.bottomLeft, | |
child: Text( | |
(isShowHintText) ? '' : overlapText, | |
textAlign: TextAlign.start, | |
style: (txtController.text.isEmpty) ? widget.lblNormalStyle : widget.lblHighlightStyle, |
@override | |
void initState() { | |
... | |
_focusNode.addListener(() { | |
if (!_focusNode.hasFocus) { | |
setState(() { | |
if (txtController.text.isEmpty) { | |
isShowHintText = true; | |
} else { | |
isShowHintText = false; |
const String PARSE_APP_ID = '{YOUR APP ID}'; | |
const String PARSE_APP_URL = 'https://parseapi.back4app.com'; | |
const String MASTER_KEY = '{YOUR MASTER KEY}'; | |
const String LIVE_QUERY_URL = 'wss://trongdth.back4app.io'; |
import 'package:meta/meta.dart'; | |
import 'package:parse_server_sdk/parse_server_sdk.dart'; | |
class UserRepository { | |
UserRepository(); | |
/// Auth [email], [password] | |
/// |
import 'package:flutter_bloc_back4app/data/models/message.dart'; | |
import 'package:parse_server_sdk/parse_server_sdk.dart'; | |
class MessageRepository { | |
MessageRepository(); | |
Future<List> loadAllMessages() async { | |
var apiResponse = await Message().getAll(); |
import 'package:equatable/equatable.dart'; | |
import 'package:parse_server_sdk/parse_server_sdk.dart'; | |
abstract class AuthenticationEvent extends Equatable { | |
AuthenticationEvent([List props = const []]) : super(props); | |
} | |
class AppStarted extends AuthenticationEvent { | |
@override | |
String toString() => 'AppStarted'; |
import 'package:equatable/equatable.dart'; | |
abstract class AuthenticationState extends Equatable {} | |
class AuthenticationUninitialized extends AuthenticationState { | |
@override | |
String toString() => 'AuthenticationUninitialized'; | |
} | |
class AuthenticationAuthenticated extends AuthenticationState { |