<commit_before>import 'dart:io';

import 'package:device_info_plus/device_info_plus.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:swassistant/preferences.dart' as preferences;
import 'package:swassistant/sw.dart';
import 'package:swassistant/profiles/character.dart';
import 'package:swassistant/profiles/minion.dart';
import 'package:swassistant/profiles/vehicle.dart';
import 'package:swassistant/profiles/utils/editable.dart';
import 'package:swassistant/ui/intro/intro_one.dart';
import 'package:swassistant/ui/intro/intro.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:swassistant/ui/misc/bottom.dart';
import 'package:uuid/uuid.dart';

class IntroZero extends StatelessWidget{

  const IntroZero({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) =>
    IntroScreen(
      nextScreen: const IntroOne(),
      prevScreenAction: SW.of(context).devMode ? () {      
        var app = SW.of(context);
        app.prefs.setBool(preferences.driveFirstLoad, true);
        app.prefs.setBool(preferences.firstStart, false);
        if(kIsWeb) app.prefs.setBool(preferences.googleDrive, true);
        Navigator.pushNamedAndRemoveUntil(
          context, SW.of(context).getPreference(preferences.startingScreen, "/characters"), (route) => false);
      } : null,
      defPrevScreen: false,
      prevScreenIcon: const Icon(Icons.exit_to_app),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Text(
            AppLocalizations.of(context)!.introWelcome,
            style: Theme.of(context).textTheme.headline4
          ),
          const SizedBox(height: 5),
          Text(
            AppLocalizations.of(context)!.introPage0Line1,
            textAlign: TextAlign.justify,
          ),
          const SizedBox(height:10),
          Text(
            (!kIsWeb) ? AppLocalizations.of(context)!.introPage0Line2 : AppLocalizations.of(context)!.introPage0WebNotice,
            textAlign: TextAlign.justify,
          ),
        ]
      )
    );

  int oldImport(BuildContext context){
    var extStorage = Directory("/sdcard");
    if (extStorage.existsSync()){
      var charsFold = Directory(extStorage.path + "/SWChars");<commit_msg>Missed a line<commit_after>import 'dart:io';

import 'package:device_info_plus/device_info_plus.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:swassistant/preferences.dart' as preferences;
import 'package:swassistant/sw.dart';
import 'package:swassistant/profiles/character.dart';
import 'package:swassistant/profiles/minion.dart';
import 'package:swassistant/profiles/vehicle.dart';
import 'package:swassistant/profiles/utils/editable.dart';
import 'package:swassistant/ui/intro/intro_one.dart';
import 'package:swassistant/ui/intro/intro.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:swassistant/ui/misc/bottom.dart';
import 'package:uuid/uuid.dart';

class IntroZero extends StatelessWidget{

  const IntroZero({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) =>
    IntroScreen(
      nextScreen: const IntroOne(),
      prevScreenAction: SW.of(context).devMode ? () {      
        var app = SW.of(context);
        app.prefs.setBool(preferences.driveFirstLoad, true);
        app.prefs.setBool(preferences.firstStart, false);
        if(kIsWeb) app.prefs.setBool(preferences.googleDrive, true);
        Navigator.pushNamedAndRemoveUntil(
          context, SW.of(context).getPreference(preferences.startingScreen, "/characters"), (route) => false);
      } : null,
      defPrevScreen: false,
      prevScreenIcon: const Icon(Icons.exit_to_app),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Text(
            AppLocalizations.of(context)!.introWelcome,
            style: Theme.of(context).textTheme.headline4
          ),
          const SizedBox(height: 5),
          Text(
            AppLocalizations.of(context)!.introPage0Line1,
            textAlign: TextAlign.justify,
          ),
          const SizedBox(height:10),
          if(kIsWeb) Text(
            AppLocalizations.of(context)!.introPage0WebNotice,
            textAlign: TextAlign.justify,
          ),
        ]
      )
    );

  int oldImport(BuildContext context){
    var extStorage = Directory("/sdcard");
    if (extStorage.existsSync()){
      var charsFold = Directory(extStorage.path + "/SWChars");
{'fraction_non_alphanumeric': 0.12246676835911964, 'fraction_numerical': 0.004358247984310307, 'mean_word_length': 3.473684210526316, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3801837', 'n_tokens_mistral': 1469, 'n_tokens_neox': 1414, 'n_words': 218}