__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
import 'dart:io';

import 'package:args/args.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:prompting_client/prompting_client.dart';
import 'package:prompting_client_ui/fake_prompting_client.dart';
import 'package:prompting_client_ui/l10n.dart';
import 'package:prompting_client_ui/pages/prompt_page.dart';
import 'package:prompting_client_ui/theme.dart';
import 'package:ubuntu_logger/ubuntu_logger.dart';
import 'package:ubuntu_service/ubuntu_service.dart';
import 'package:yaru/yaru.dart';

const envVarSocketPath = 'PROMPTING_CLIENT_SOCKET';

Future<void> main(List<String> args) async {
  // We specify path as an empty string in order to get ubuntu_logger to skip
  // setting up a file for logging
  Logger.setup(path: '', level: LogLevel.info);
  final log = Logger('apparmor_prompt');

  await YaruWindowTitleBar.ensureInitialized();

  final parser = ArgParser()
    ..addFlag(
      'dry-run',
      help: 'Use a fake apparmor prompting client',
    )
    ..addOption(
      'test-prompt',
      help: 'Path to a JSON file containing the test prompt',
      defaultsTo: 'lib/test_prompt_details.json',
    );

  final ArgResults argResults;
  try {
    argResults = parser.parse(args);
  } on FormatException catch (_) {
    stdout.writeln(parser.usage);
    exit(2);
  }

  if (argResults.flag('dry-run')) {
    final fileName = argResults['test-prompt'] as String;
    if (!File(fileName).existsSync()) {
      log.error('Test prompt file $fileName does not exist');
      exit(1);
    }
    registerService<PromptingClient>(
      () => FakeApparmorPromptingClient.fromFile(fileName),
    );
  } else {
    final socketPath = Platform.environment[envVarSocketPath];
    if (socketPath == null) {
      log.error('$envVarSocketPath not set');
      exit(1);
    }
    registerService<PromptingClient>(
      () => PromptingClient(
        InternetAddress(socketPath, type: InternetAddressType.unix),
      ),
    );
  }

  final currentPrompt = await getService<PromptingClient>().getCurrentPrompt();
  registerServiceInstance<PromptDetails>(currentPrompt);

  await initDefaultLocale();

  runApp(const ProviderScope(child: PromptDialog()));
}

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

  @override
  Widget build(BuildContext context) {
    return YaruTheme(
      builder: (context, yaru, child) => MaterialApp(
        theme: yaru.theme?.customize(),
        darkTheme: yaru.darkTheme?.customize(),
        highContrastTheme: yaruHighContrastLight.customize(),
        highContrastDarkTheme: yaruHighContrastDark.customize(),
        debugShowCheckedModeBanner: false,
        localizationsDelegates: localizationsDelegates,
        supportedLocales: supportedLocales,
        home: const PromptPage(),
      ),
    );
  }
}

Filemanager

Name Type Size Permission Actions
app Folder 0755
l10n Folder 0755
pages Folder 0755
widgets Folder 0755
fake_prompting_client.dart File 1.52 KB 0644
l10n.dart File 603 B 0644
l10n_x.dart File 1.87 KB 0644
main.dart File 2.79 KB 0644
test_prompt_details.json File 1.38 KB 0644
theme.dart File 268 B 0644
Filemanager