Skip to content

Instantly share code, notes, and snippets.

📱

Carlos Eugenio Torres cetorres

📱
Block or report user

Report or block cetorres

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cetorres
cetorres / DetectiPhoneX.dart
Created Oct 9, 2019
Detect iPhone X or greater in Flutter / Dart
View DetectiPhoneX.dart
class DetectiPhoneXOrGreater {
static bool isiPhoneXOrGreater(context) {
if (Platform.isAndroid) {
return false;
}
else if (Platform.isIOS) {
double height = MediaQuery.of(context).size.height;
if (height >= 812.0) return true;
}
return false;
@cetorres
cetorres / DebugMode.dart
Created Oct 9, 2019
Detect debug mode in Flutter / Dart
View DebugMode.dart
class DebugMode {
static bool get isInDebugMode {
bool inDebugMode = false;
assert(inDebugMode = true);
return inDebugMode;
}
}
@cetorres
cetorres / main_page.dart
Created Sep 28, 2019
Push notifications with Firebase Cloud Messaging and Flutter
View main_page.dart
import 'package:flutter/material.dart';
import '../utils/util.dart';
import '../controllers/push_notifications.dart';
class MainPage extends StatefulWidget {
@override
_MainPageState createState() => _MainPageState();
}
class _MainPageState extends State<MainPage> {
You can’t perform that action at this time.