Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/controllers/model_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ class ModelController extends GetxController {

_manager.addCustomModel(model);

final sizeStr = sizeGb > 0 ? ' (${sizeGb} GB)' : '';
final sizeStr = sizeGb > 0 ? ' ($sizeGb GB)' : '';
Get.snackbar('Model Added', '$name$sizeStr added to your library!',
snackPosition: SnackPosition.BOTTOM);
}
Expand Down
6 changes: 3 additions & 3 deletions lib/screens/api_endpoints_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ class _ApiEndpointsScreenState extends State<ApiEndpointsScreen> {
Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: running ? AppColors.green.withOpacity(0.1) : AppColors.red.withOpacity(0.1),
color: running ? AppColors.green.withValues(alpha: 0.1) : AppColors.red.withValues(alpha: 0.1),
border: Border.all(
color: running ? AppColors.green.withOpacity(0.3) : AppColors.red.withOpacity(0.3),
color: running ? AppColors.green.withValues(alpha: 0.3) : AppColors.red.withValues(alpha: 0.3),
),
borderRadius: BorderRadius.circular(12),
),
Expand Down Expand Up @@ -201,7 +201,7 @@ class _ApiEndpointsScreenState extends State<ApiEndpointsScreen> {
Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: methodColor.withOpacity(0.15),
color: methodColor.withValues(alpha: 0.15),
borderRadius: BorderRadius.circular(6),
),
child: Text(
Expand Down
10 changes: 5 additions & 5 deletions lib/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class _HomeScreenState extends State<HomeScreen> {
onDestinationSelected: (i) => setState(() => _mobileTabIndex = i),
backgroundColor: Colors.transparent,
elevation: 0,
indicatorColor: AppColors.accent.withOpacity(0.15),
indicatorColor: AppColors.accent.withValues(alpha: 0.15),
labelBehavior: NavigationDestinationLabelBehavior.alwaysShow,
height: 64,
destinations: [
Expand Down Expand Up @@ -655,9 +655,9 @@ class _HomeScreenState extends State<HomeScreen> {
height: 32,
decoration: BoxDecoration(
color: isActive
? AppColors.green.withOpacity(0.15)
? AppColors.green.withValues(alpha: 0.15)
: isLoading
? AppColors.orange.withOpacity(0.15)
? AppColors.orange.withValues(alpha: 0.15)
: context.bgHover,
borderRadius: BorderRadius.circular(8),
),
Expand Down Expand Up @@ -815,7 +815,7 @@ class _HomeScreenState extends State<HomeScreen> {
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: context.bgHover.withOpacity(0.5),
color: context.bgHover.withValues(alpha: 0.5),
),
child: Row(
mainAxisSize: MainAxisSize.min,
Expand Down Expand Up @@ -1045,7 +1045,7 @@ class _HomeScreenState extends State<HomeScreen> {
borderRadius: BorderRadius.circular(24),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(context.isDark ? 0.15 : 0.04),
color: Colors.black.withValues(alpha: context.isDark ? 0.15 : 0.04),
blurRadius: 8,
offset: const Offset(0, 2),
),
Expand Down
7 changes: 3 additions & 4 deletions lib/screens/model_library_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ class _ModelLibraryBodyState extends State<_ModelLibraryBody> {
filtered = allCatalog.where((m) => m.isCustom).toList();
break;
case _Filter.all:
default:
filtered = allCatalog;
}

Expand Down Expand Up @@ -527,7 +526,7 @@ class _ImportButton extends StatelessWidget {
width: 40,
height: 40,
decoration: BoxDecoration(
color: color.withOpacity(0.15),
color: color.withValues(alpha: 0.15),
borderRadius: BorderRadius.circular(10),
),
child: Icon(icon, color: color, size: 20),
Expand Down Expand Up @@ -563,7 +562,7 @@ class _ImportButton extends StatelessWidget {
labelText: 'Model Name',
labelStyle: TextStyle(color: context.textD, fontSize: 13),
hintText: 'e.g. Mistral 7B Uncensored',
hintStyle: TextStyle(color: context.textD.withOpacity(0.5)),
hintStyle: TextStyle(color: context.textD.withValues(alpha: 0.5)),
filled: true,
fillColor: context.bgInput,
border: OutlineInputBorder(
Expand All @@ -589,7 +588,7 @@ class _ImportButton extends StatelessWidget {
labelText: 'Download URL',
labelStyle: TextStyle(color: context.textD, fontSize: 13),
hintText: 'https://huggingface.co/.../model.gguf',
hintStyle: TextStyle(color: context.textD.withOpacity(0.5)),
hintStyle: TextStyle(color: context.textD.withValues(alpha: 0.5)),
filled: true,
fillColor: context.bgInput,
border: OutlineInputBorder(
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ class _SettingsBody extends StatelessWidget {
margin: const EdgeInsets.only(top: 4, bottom: 8),
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: AppColors.orange.withOpacity(0.1),
border: Border.all(color: AppColors.orange.withOpacity(0.3)),
color: AppColors.orange.withValues(alpha: 0.1),
border: Border.all(color: AppColors.orange.withValues(alpha: 0.3)),
borderRadius: BorderRadius.circular(8),
),
child: Row(
Expand Down
1 change: 0 additions & 1 deletion lib/services/llm_service.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:async';
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:get/get.dart';
import 'package:llamadart/llamadart.dart';
import 'package:path/path.dart' as p;
Expand Down
6 changes: 3 additions & 3 deletions lib/widgets/chat_bubble.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@ class ChatBubble extends StatelessWidget {
fontSize: 13,
color: const Color(0xFFE6EDF3),
backgroundColor: context.isDark
? Colors.white.withOpacity(0.08)
: Colors.black.withOpacity(0.06),
? Colors.white.withValues(alpha: 0.08)
: Colors.black.withValues(alpha: 0.06),
),
codeblockDecoration: BoxDecoration(
color: const Color(0xFF1E1E2E),
borderRadius: BorderRadius.circular(8),
),
codeblockPadding: const EdgeInsets.all(14),
blockquoteDecoration: BoxDecoration(
color: AppColors.accent.withOpacity(0.08),
color: AppColors.accent.withValues(alpha: 0.08),
border: const Border(
left: BorderSide(color: AppColors.accent, width: 3),
),
Expand Down
22 changes: 11 additions & 11 deletions lib/widgets/model_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ class ModelCard extends StatelessWidget {
return Container(
margin: const EdgeInsets.only(bottom: 12),
decoration: BoxDecoration(
color: isLoaded ? AppColors.accent.withOpacity(0.05) : context.bgPanel,
color: isLoaded ? AppColors.accent.withValues(alpha: 0.05) : context.bgPanel,
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: isLoaded
? AppColors.accent.withOpacity(0.5)
? AppColors.accent.withValues(alpha: 0.5)
: isLoadingModel
? AppColors.orange.withOpacity(0.5)
? AppColors.orange.withValues(alpha: 0.5)
: isCurrentlyDownloading
? AppColors.orange.withOpacity(0.4)
? AppColors.orange.withValues(alpha: 0.4)
: context.border,
),
),
Expand Down Expand Up @@ -177,7 +177,7 @@ class ModelCard extends StatelessWidget {
Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 3),
decoration: BoxDecoration(
color: AppColors.orange.withOpacity(0.15),
color: AppColors.orange.withValues(alpha: 0.15),
borderRadius: BorderRadius.circular(6),
),
child: Text(
Expand Down Expand Up @@ -249,7 +249,7 @@ class ModelCard extends StatelessWidget {
Container(
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
decoration: BoxDecoration(
color: AppColors.accent.withOpacity(0.1),
color: AppColors.accent.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(4),
),
child: Text(
Expand Down Expand Up @@ -373,7 +373,7 @@ class ModelCard extends StatelessWidget {
Tooltip(
message: 'Unload model from memory',
child: Material(
color: AppColors.orange.withOpacity(0.12),
color: AppColors.orange.withValues(alpha: 0.12),
borderRadius: BorderRadius.circular(8),
child: InkWell(
onTap: onUnload,
Expand All @@ -399,8 +399,8 @@ class ModelCard extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 3),
decoration: BoxDecoration(
color: isUncensored
? AppColors.uncensored.withOpacity(0.15)
: AppColors.standard.withOpacity(0.15),
? AppColors.uncensored.withValues(alpha: 0.15)
: AppColors.standard.withValues(alpha: 0.15),
borderRadius: BorderRadius.circular(4),
),
child: Text(
Expand All @@ -419,7 +419,7 @@ class ModelCard extends StatelessWidget {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 3),
decoration: BoxDecoration(
color: AppColors.accent.withOpacity(0.15),
color: AppColors.accent.withValues(alpha: 0.15),
borderRadius: BorderRadius.circular(4),
),
child: Text(
Expand All @@ -437,7 +437,7 @@ class ModelCard extends StatelessWidget {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 3),
decoration: BoxDecoration(
color: color.withOpacity(0.15),
color: color.withValues(alpha: 0.15),
borderRadius: BorderRadius.circular(4),
),
child: Row(
Expand Down