Skip to content

SECTL/SecRandom-Lite

Repository files navigation

SecRandom Lite

GitHub Issues 最新版本 上次更新 License: GPL v3

QQ群 bilibili


SecRandom Lite 是 SecRandom 的轻量级 Flutter 版本。

  • 继承了 SecRandom 的公平抽取等核心特性
  • 支持运行在 Android、iOS、Windows、macOS、Linux 和 Web
  • 采用 Material Design 3 设计规范
  • 基于 Flutter ,启动快、占用少

支持平台

平台 最低版本
Android Android 5.0 (API 21)
iOS iOS 13.0
Windows Windows 10
macOS macOS 10.15 (Catalina)
Linux Ubuntu 18.04+
Web 现代浏览器

下载/安装

下载

Android

  1. 从 Releases 页面下载 APK 文件
  2. 在设备上安装

Windows

  1. 从 Releases 页面下载 Windows 安装包
  2. 解压后即可使用

Web

应用截图

截图即将添加

技术栈

技术 版本 用途
Flutter >=3.11.0 跨平台 UI 框架
Dart >=3.0.0 编程语言
Provider ^6.1.1 状态管理
Material Design 3 - UI 设计规范
SharedPreferences ^2.2.2 本地持久化
Excel ^4.0.6 Excel 文件解析
File Picker ^8.0.0 文件选择

项目结构

secrandom_lite/
├── lib/
│   ├── main.dart                 # 应用入口
│   ├── models/                   # 数据模型
│   │   ├── student.dart          # 学生模型
│   │   ├── prize.dart            # 奖品模型
│   │   ├── history_record.dart   # 历史记录模型
│   │   └── app_config.dart       # 应用配置模型
│   ├── services/                 # 业务逻辑
│   │   ├── random_service.dart   # 随机抽取服务
│   │   ├── lottery_service.dart  # 抽奖服务
│   │   ├── data_service.dart     # 数据服务
│   │   └── excel_import_service.dart # Excel 导入服务
│   ├── providers/                # 状态管理
│   │   ├── app_provider.dart     # 应用状态
│   │   └── auth_provider.dart    # 认证状态
│   ├── screens/                  # 页面
│   │   ├── home_screen.dart      # 主页
│   │   ├── lottery_screen.dart   # 抽奖页
│   │   ├── history/              # 历史记录
│   │   └── settings/             # 设置页
│   ├── widgets/                  # 可复用组件
│   │   ├── nav_rail.dart         # 导航栏
│   │   ├── control_panel.dart    # 控制面板
│   │   └── name_display.dart     # 名字显示
│   └── utils/                    # 工具类
├── assets/                       # 资源文件
├── test/                         # 测试文件
├── android/                      # Android 平台代码
├── ios/                          # iOS 平台代码
├── windows/                      # Windows 平台代码
├── macos/                        # macOS 平台代码
├── linux/                        # Linux 平台代码
└── web/                          # Web 平台代码

快速开始

环境要求

  • Flutter SDK: >=3.11.0
  • Dart SDK: >=3.0.0

安装步骤

  1. 克隆仓库

    git clone https://github.com/SECTL/SecRandom-Lite.git
    cd SecRandom-Lite
  2. 安装依赖

    flutter pub get
  3. 运行应用

    # 开发模式
    flutter run
    
    # 指定设备
    flutter run -d chrome      # Web
    flutter run -d windows     # Windows
    flutter run -d android     # Android

构建发布版本

# Android APK
flutter build apk --release

# Windows
flutter build windows --release

# Web
flutter build web --release

# macOS
flutter build macos --release

# Linux
flutter build linux --release

运行测试

# 运行所有测试
flutter test

# 运行单元测试
flutter test test/unit_test.dart

# 运行带覆盖率的测试
flutter test --coverage

联系方式

许可证

本项目基于 GNU General Public License v3.0 开源。


About

SecRandom 基于 Flutter 轻量版本,在继承 SecRandom 的大部分核心设计的基础,上提供了更轻量的体积和多平台适配

Resources

License

Stars

Watchers

Forks

Contributors