firebase_fcm_token 1.1.0 copy "firebase_fcm_token: ^1.1.0" to clipboard
firebase_fcm_token: ^1.1.0 copied to clipboard

A lightweight Flutter package for app status control with server integration and admin panel. Control your app remotely, show white screen when disabled, and manage everything through admin panel.

🎯 Firebase FCM Token - App Status Controller #

pub package License: MIT

A lightweight Flutter package for remote app status control with server integration and admin panel. Perfect for managing app availability, showing maintenance screens, and controlling user access remotely.

✨ Features #

  • 🎛️ Remote App Control - Enable/disable your app from admin panel
  • 🖥️ Admin Panel - Beautiful web interface for app management
  • 📱 White Screen Mode - Show blank screen when app is disabled
  • 🔧 Easy Integration - Just one line of code to implement
  • 🚀 Production Ready - Includes deployment guides and security
  • 📊 Detailed Logging - Flutter console error messages when disabled
  • 🌐 Server Included - Complete PHP backend with MySQL

🚀 Quick Start #

1. Add to pubspec.yaml #

dependencies:
  firebase_fcm_token: ^1.1.0

2. Initialize in your app #

import 'package:firebase_fcm_token/firebase_fcm_token.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  
  // Initialize with just your app name
  await FirebaseFcmToken().initialize(
    appName: 'my_awesome_app',
  );

  runApp(MyApp());
}

3. Wrap your app with status widget #

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return FirebaseFcmToken().buildAppStatusWidget(
      child: MaterialApp(
        title: 'My App',
        home: HomePage(),
      ),
    );
  }
}

That's it! 🎉 Your app now supports remote control.

📋 What happens when app is disabled? #

When your app is disabled from the admin panel:

  1. White Screen - Users see a blank white screen
  2. Console Errors - Detailed error messages in Flutter console
  3. No Functionality - All app features are blocked
  4. Admin Control - Only admin can re-enable the app

🖥️ Admin Panel #

Access your admin panel at: https://yourdomain.com/server/admin/

Features:

  • 📊 Real-time app statistics
  • 📱 Enable/disable apps with one click
  • 👥 User and device tracking
  • 📈 Usage analytics
  • 🔍 Detailed logs and monitoring

Default Login:

  • Password: admin123 (change this!)

🛠️ Server Setup #

  1. Upload Server Files

    # Upload the server/ directory to your hosting
    # Example: yourdomain.com/server/
    
  2. Create MySQL Database

    CREATE DATABASE firebase_fcm_db;
    
  3. Configure Database

    // server/config.php
    define('DB_HOST', 'localhost');
    define('DB_NAME', 'firebase_fcm_db');  
    define('DB_USER', 'your_username');
    define('DB_PASS', 'your_password');
    
  4. Import Database Schema

    • Use PHPMyAdmin to import server/database.sql

📖 Documentation #

  • 📘 Setup Guide - Complete installation instructions
  • 🚀 Production Guide - Deploy to production securely
  • 💡 Examples - Code examples and use cases

🔧 API Methods #

final controller = FirebaseFcmToken();

// Check if app is enabled
bool isEnabled = controller.isAppEnabled;

// Refresh app status from server
await controller.refreshAppStatus();

// Build status widget (shows white screen if disabled)
Widget statusWidget = controller.buildAppStatusWidget(
  child: YourApp(),
);

🌟 Use Cases #

  • Maintenance Mode - Disable app during updates
  • Emergency Stop - Instantly disable problematic versions
  • Gradual Rollout - Control which users see new features
  • A/B Testing - Enable features for specific user groups
  • Regional Control - Disable app in specific regions

🔒 Security Features #

  • ✅ Rate limiting on API calls
  • ✅ Admin panel authentication
  • ✅ SQL injection protection
  • ✅ HTTPS enforcement
  • ✅ IP whitelisting support

📱 Supported Platforms #

  • Android - Full support
  • iOS - Full support
  • Web - Full support
  • Desktop - Full support

🤝 Contributing #

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

📄 License #

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support #

⭐ Show Your Support #

If this package helped you, please ⭐ star the repo and share it with other developers!


Made with ❤️ by the Firebase FCM Token team

3
likes
0
points
15
downloads

Publisher

verified publishercinar.fun

Weekly Downloads

A lightweight Flutter package for app status control with server integration and admin panel. Control your app remotely, show white screen when disabled, and manage everything through admin panel.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

flutter, http, shared_preferences

More

Packages that depend on firebase_fcm_token