Skip to content

rohankarn35/ubunutu_terminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖥️ Ubuntu Terminal for Flutter

Pub Version License: MIT Supported Platforms Likes

Ubuntu Terminal Preview

A sleek, customizable Ubuntu-style terminal emulator for Flutter applications



Note:
This package is designed to work on Web platforms only.


✨ Features

Core Features

  • 🎯 Ubuntu-inspired terminal interface
  • 💻 Customizable command prompt
  • 🔍 User-defined commands and responses
  • 📜 Command history tracking

UI Features

  • 🎨 Classic Ubuntu terminal theme
  • 📱 Responsive design
  • 🖥️ Window control buttons
  • ⌨️ Smart input focus management

🚀 Quick Start

Installation

Add to your pubspec.yaml:

dependencies:
  ubunutu_terminal: ^0.1.0

Run:

flutter pub get

Basic Implementation

import 'package:flutter/material.dart';
import 'package:ubunutu_terminal/ubunutu_terminal.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    final commands = {
      'hello': '👋 Hello, Terminal User!',
      'date': '📅 ${DateTime.now()}',
      'help': '''
📚 Available Commands:
  • hello - Greet the user
  • date  - Show current date/time
  • help  - Display this help
  • clear - Clear terminal
''',
    };

    return MaterialApp(
      theme: ThemeData.dark(),
      home: Scaffold(
        body: TerminalPage(
          terminalPrompt: 'user@ubuntu',
          commands: commands,
        ),
      ),
    );
  }
}

🛠️ Advanced Usage

Custom Command Configuration

Create rich terminal experiences with custom commands:

final Map<String, String> commands = {
  'welcome': '''
    ╔════════════════════════════════╗
    ║  Welcome to Ubuntu Terminal!   ║
    ║  Type 'help' to get started   ║
    ╚════════════════════════════════╝
  ''',
  'system': '''
    OS: Ubuntu Terminal Emulator
    Version: 1.0.0
    Flutter: ${Theme.of(context).platform}
  ''',
  'time': '🕒 ${DateTime.now().toLocal()}',
  'help': '''
    📋 Command List:
    • welcome - Show welcome message
    • system  - Display system info
    • time    - Show current time
    • clear   - Clear terminal
  '''
};

📐 Space Requirements & Responsiveness

The terminal automatically adapts to different screen sizes while maintaining optimal usability:

Minimum Requirements:
└── Width:  400px
└── Height: 300px

Recommended:
└── Width:  80% of screen width
└── Height: 80% of screen height

Scaling Factors

// Automatically adjusts to screen size
_widthFactor = 0.8;   // 80% width
_heightFactor = 0.8;  // 80% height

🔜 Upcoming Features

  • ⌨️ Command history navigation (↑/↓ arrows)
  • 📋 Copy/paste functionality
  • 🔍 Text selection support
  • 📝 Command auto-completion
  • ⚡ Keyboard shortcuts
  • 🔄 Configurable buffer size

🤝 Contributing

We welcome contributions! Here's how you can help:

  1. 🍴 Fork the repository
  2. 🌿 Create your feature branch (git checkout -b feature/amazing-feature)
  3. 💻 Code your magic
  4. 📝 Commit changes (git commit -m 'Add amazing feature')
  5. 🚀 Push to the branch (git push origin feature/amazing-feature)
  6. 🔍 Open a Pull Request

📜 License

Licensed under the MIT License - see the LICENSE file for details.

👨‍💻 Author

Rohan Karn

❤️ Support

If you find this package helpful:

  • ⭐ Star the repository
  • 🐛 Report bugs via issues
  • 💡 Suggest features
  • 🔀 Submit pull requests

Built with ❤️ by Rohan Karn

About

A ubunutu terminal like widget created for flutter web on desktop

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages