diff --git a/assets/rive/game_button.bk.riv b/assets/rive/game_button.bk.riv new file mode 100644 index 0000000..784de01 Binary files /dev/null and b/assets/rive/game_button.bk.riv differ diff --git a/assets/rive/game_button.riv b/assets/rive/game_button.riv index 784de01..c2f2bd6 100644 Binary files a/assets/rive/game_button.riv and b/assets/rive/game_button.riv differ diff --git a/assets/rive/small_lake_on_a_rainy_day.bk.riv b/assets/rive/small_lake_on_a_rainy_day.bk.riv new file mode 100644 index 0000000..a18defe Binary files /dev/null and b/assets/rive/small_lake_on_a_rainy_day.bk.riv differ diff --git a/assets/rive/small_lake_on_a_rainy_day.riv b/assets/rive/small_lake_on_a_rainy_day.riv index a18defe..ae89c31 100644 Binary files a/assets/rive/small_lake_on_a_rainy_day.riv and b/assets/rive/small_lake_on_a_rainy_day.riv differ diff --git a/ios/Flutter/ephemeral/flutter_lldb_helper.py b/ios/Flutter/ephemeral/flutter_lldb_helper.py new file mode 100644 index 0000000..a88caf9 --- /dev/null +++ b/ios/Flutter/ephemeral/flutter_lldb_helper.py @@ -0,0 +1,32 @@ +# +# Generated file, do not edit. +# + +import lldb + +def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict): + """Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages.""" + base = frame.register["x0"].GetValueAsAddress() + page_len = frame.register["x1"].GetValueAsUnsigned() + + # Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the + # first page to see if handled it correctly. This makes diagnosing + # misconfiguration (e.g. missing breakpoint) easier. + data = bytearray(page_len) + data[0:8] = b'IHELPED!' + + error = lldb.SBError() + frame.GetThread().GetProcess().WriteMemory(base, data, error) + if not error.Success(): + print(f'Failed to write into {base}[+{page_len}]', error) + return + +def __lldb_init_module(debugger: lldb.SBDebugger, _): + target = debugger.GetDummyTarget() + # Caveat: must use BreakpointCreateByRegEx here and not + # BreakpointCreateByName. For some reasons callback function does not + # get carried over from dummy target for the later. + bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$") + bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__)) + bp.SetAutoContinue(True) + print("-- LLDB integration loaded --") diff --git a/ios/Flutter/ephemeral/flutter_lldbinit b/ios/Flutter/ephemeral/flutter_lldbinit new file mode 100644 index 0000000..e3ba6fb --- /dev/null +++ b/ios/Flutter/ephemeral/flutter_lldbinit @@ -0,0 +1,5 @@ +# +# Generated file, do not edit. +# + +command script import --relative-to-command-file flutter_lldb_helper.py diff --git a/lib/app.dart b/lib/app.dart index b3785a2..66fdf12 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:sozzle/core/routes/routes.dart'; -import 'package:sozzle/l10n/l10n.dart'; +import 'package:sozzle/l10n/arb/app_localizations.dart'; import 'package:sozzle/src/apploader/application/apploader_repository.dart'; import 'package:sozzle/src/apploader/cubit/apploader_cubit.dart'; import 'package:sozzle/src/audio/audio_controller.dart'; diff --git a/lib/bootstrap.dart b/lib/bootstrap.dart index 1bcf5bc..3203a7f 100644 --- a/lib/bootstrap.dart +++ b/lib/bootstrap.dart @@ -31,11 +31,12 @@ Future bootstrap(FutureOr Function() builder) async { Bloc.observer = const AppBlocObserver(); // Add cross-flavor configuration here + WidgetsFlutterBinding.ensureInitialized(); HydratedBloc.storage = await HydratedStorage.build( storageDirectory: kIsWeb ? HydratedStorage.webStorageDirectory : await getApplicationDocumentsDirectory(), ); - unawaited(RiveFile.initialize()); + unawaited(RiveNative.init()); runApp(await builder()); } diff --git a/lib/core/common/widgets/game_button.dart b/lib/core/common/widgets/game_button.dart index 8ab4a92..920caf8 100644 --- a/lib/core/common/widgets/game_button.dart +++ b/lib/core/common/widgets/game_button.dart @@ -4,7 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:rive/rive.dart'; -import 'package:sozzle/core/extensions/rive_extensions.dart'; import 'package:sozzle/core/res/media.dart'; class GameButton extends StatefulWidget { @@ -18,9 +17,9 @@ class GameButton extends StatefulWidget { } class _GameButtonState extends State { - RiveFile? _riveFile; + File? _riveFile; - StateMachineController? controller; + late RiveWidgetController controller; bool clicked = false; @@ -32,15 +31,34 @@ class _GameButtonState extends State { @override void dispose() { - controller?.dispose(); + controller.dispose(); super.dispose(); } - void _preload() { - rootBundle.load(Media.gameButton).then((data) { - setState(() { - _riveFile = RiveFile.import(data); - }); + Future _preload() async { + final data = await rootBundle.load(Media.gameButton); + _riveFile = await File.decode( + data.buffer.asUint8List(), + riveFactory: Factory.rive, + ); + controller = RiveWidgetController(_riveFile!); + _onInit(controller.artboard); + setState(() {}); + } + + void _onInit(Artboard artboard) { + artboard.setText('buttonText', widget.text); + + final viewModelInstance = controller.dataBind(DataBind.auto()); + + final currentState = viewModelInstance.string('currentState'); + currentState?.addListener((value) { + if (value == 'click') { + clicked = true; + } else if (value == 'rest' && clicked) { + clicked = false; + widget.onPressed?.call(); + } }); } @@ -51,26 +69,11 @@ class _GameButtonState extends State { child: SizedBox( width: 200, height: 50, - child: RiveAnimation.direct( - _riveFile!, - fit: BoxFit.cover, - stateMachines: const ['Button Animation'], - onInit: (artboard) { - artboard.textRun('buttonText')!.text = widget.text; - controller = StateMachineController.fromArtboard( - artboard, - 'Button Animation', - onStateChange: (stateMachine, stateName) { - if (stateName == 'Click') { - clicked = true; - } else if (stateName == 'Rest' && clicked) { - clicked = false; - widget.onPressed?.call(); - } - }, - ); - artboard.addController(controller!); - }, + child: RiveWidget( + controller: controller, + fit: Fit.cover, + cursor: SystemMouseCursors.click, + // stateMachines: const ['Button Animation'], ), ), ); diff --git a/lib/core/extensions/rive_extensions.dart b/lib/core/extensions/rive_extensions.dart deleted file mode 100644 index 4e43a25..0000000 --- a/lib/core/extensions/rive_extensions.dart +++ /dev/null @@ -1,6 +0,0 @@ -// coverage:ignore-file -import 'package:rive/rive.dart'; - -extension TextExtension on Artboard { - TextValueRun? textRun(String name) => component(name); -} diff --git a/lib/l10n/arb/app_localizations.dart b/lib/l10n/arb/app_localizations.dart new file mode 100644 index 0000000..70e86b8 --- /dev/null +++ b/lib/l10n/arb/app_localizations.dart @@ -0,0 +1,163 @@ +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:intl/intl.dart' as intl; + +import 'app_localizations_en.dart'; +import 'app_localizations_es.dart'; + +// ignore_for_file: type=lint + +/// Callers can lookup localized strings with an instance of AppLocalizations +/// returned by `AppLocalizations.of(context)`. +/// +/// Applications need to include `AppLocalizations.delegate()` in their app's +/// `localizationDelegates` list, and the locales they support in the app's +/// `supportedLocales` list. For example: +/// +/// ```dart +/// import 'arb/app_localizations.dart'; +/// +/// return MaterialApp( +/// localizationsDelegates: AppLocalizations.localizationsDelegates, +/// supportedLocales: AppLocalizations.supportedLocales, +/// home: MyApplicationHome(), +/// ); +/// ``` +/// +/// ## Update pubspec.yaml +/// +/// Please make sure to update your pubspec.yaml to include the following +/// packages: +/// +/// ```yaml +/// dependencies: +/// # Internationalization support. +/// flutter_localizations: +/// sdk: flutter +/// intl: any # Use the pinned version from flutter_localizations +/// +/// # Rest of dependencies +/// ``` +/// +/// ## iOS Applications +/// +/// iOS applications define key application metadata, including supported +/// locales, in an Info.plist file that is built into the application bundle. +/// To configure the locales supported by your app, you’ll need to edit this +/// file. +/// +/// First, open your project’s ios/Runner.xcworkspace Xcode workspace file. +/// Then, in the Project Navigator, open the Info.plist file under the Runner +/// project’s Runner folder. +/// +/// Next, select the Information Property List item, select Add Item from the +/// Editor menu, then select Localizations from the pop-up menu. +/// +/// Select and expand the newly-created Localizations item then, for each +/// locale your application supports, add a new item and select the locale +/// you wish to add from the pop-up menu in the Value field. This list should +/// be consistent with the languages listed in the AppLocalizations.supportedLocales +/// property. +abstract class AppLocalizations { + AppLocalizations(String locale) + : localeName = intl.Intl.canonicalizedLocale(locale.toString()); + + final String localeName; + + static AppLocalizations of(BuildContext context) { + return Localizations.of(context, AppLocalizations)!; + } + + static const LocalizationsDelegate delegate = + _AppLocalizationsDelegate(); + + /// A list of this localizations delegate along with the default localizations + /// delegates. + /// + /// Returns a list of localizations delegates containing this delegate along with + /// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate, + /// and GlobalWidgetsLocalizations.delegate. + /// + /// Additional delegates can be added by appending to this list in + /// MaterialApp. This list does not have to be used at all if a custom list + /// of delegates is preferred or required. + static const List> localizationsDelegates = + >[ + delegate, + GlobalMaterialLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + ]; + + /// A list of this localizations delegate's supported locales. + static const List supportedLocales = [ + Locale('en'), + Locale('es') + ]; + + /// No description provided for @startButton. + /// + /// In en, this message translates to: + /// **'Tap to Start'** + String get startButton; + + /// No description provided for @soundSettings. + /// + /// In en, this message translates to: + /// **'Sound'** + String get soundSettings; + + /// No description provided for @musicSettings. + /// + /// In en, this message translates to: + /// **'Music'** + String get musicSettings; + + /// No description provided for @darkModeSettings. + /// + /// In en, this message translates to: + /// **'Dark Mode'** + String get darkModeSettings; + + /// No description provided for @muteSettings. + /// + /// In en, this message translates to: + /// **'Mute'** + String get muteSettings; +} + +class _AppLocalizationsDelegate + extends LocalizationsDelegate { + const _AppLocalizationsDelegate(); + + @override + Future load(Locale locale) { + return SynchronousFuture(lookupAppLocalizations(locale)); + } + + @override + bool isSupported(Locale locale) => + ['en', 'es'].contains(locale.languageCode); + + @override + bool shouldReload(_AppLocalizationsDelegate old) => false; +} + +AppLocalizations lookupAppLocalizations(Locale locale) { + // Lookup logic when only language code is specified. + switch (locale.languageCode) { + case 'en': + return AppLocalizationsEn(); + case 'es': + return AppLocalizationsEs(); + } + + throw FlutterError( + 'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' + 'an issue with the localizations generation tool. Please file an issue ' + 'on GitHub with a reproducible sample app and the gen-l10n configuration ' + 'that was used.'); +} diff --git a/lib/l10n/arb/app_localizations_en.dart b/lib/l10n/arb/app_localizations_en.dart new file mode 100644 index 0000000..2c34925 --- /dev/null +++ b/lib/l10n/arb/app_localizations_en.dart @@ -0,0 +1,25 @@ +// ignore: unused_import +import 'package:intl/intl.dart' as intl; +import 'app_localizations.dart'; + +// ignore_for_file: type=lint + +/// The translations for English (`en`). +class AppLocalizationsEn extends AppLocalizations { + AppLocalizationsEn([String locale = 'en']) : super(locale); + + @override + String get startButton => 'Tap to Start'; + + @override + String get soundSettings => 'Sound'; + + @override + String get musicSettings => 'Music'; + + @override + String get darkModeSettings => 'Dark Mode'; + + @override + String get muteSettings => 'Mute'; +} diff --git a/lib/l10n/arb/app_localizations_es.dart b/lib/l10n/arb/app_localizations_es.dart new file mode 100644 index 0000000..d221451 --- /dev/null +++ b/lib/l10n/arb/app_localizations_es.dart @@ -0,0 +1,25 @@ +// ignore: unused_import +import 'package:intl/intl.dart' as intl; +import 'app_localizations.dart'; + +// ignore_for_file: type=lint + +/// The translations for Spanish Castilian (`es`). +class AppLocalizationsEs extends AppLocalizations { + AppLocalizationsEs([String locale = 'es']) : super(locale); + + @override + String get startButton => 'Tap to Start'; + + @override + String get soundSettings => 'Sonido'; + + @override + String get musicSettings => 'Música'; + + @override + String get darkModeSettings => 'Modo oscuro'; + + @override + String get muteSettings => 'Mudo'; +} diff --git a/lib/l10n/l10n.dart b/lib/l10n/l10n.dart index 450ed20..cd52ead 100644 --- a/lib/l10n/l10n.dart +++ b/lib/l10n/l10n.dart @@ -6,9 +6,7 @@ // https://opensource.org/licenses/MIT. import 'package:flutter/widgets.dart'; -import 'package:flutter_gen/gen_l10n/app_localizations.dart'; - -export 'package:flutter_gen/gen_l10n/app_localizations.dart'; +import 'package:sozzle/l10n/arb/app_localizations.dart'; extension AppLocalizationsX on BuildContext { AppLocalizations get l10n => AppLocalizations.of(this); diff --git a/lib/src/game_play/view/components/hint.dart b/lib/src/game_play/view/components/hint.dart index 3a28afb..4970864 100644 --- a/lib/src/game_play/view/components/hint.dart +++ b/lib/src/game_play/view/components/hint.dart @@ -21,9 +21,12 @@ class Hint extends StatefulWidget { } class _HintState extends State { - RiveFile? _hintFile; - SMIBool? _luminance; - SMIBool? _theme; + File? _hintFile; + late RiveWidgetController _controller; + late StateMachine? _stateController; + late StateMachine? _themeController; + BooleanInput? _luminance; + BooleanInput? _theme; @override void initState() { @@ -31,30 +34,24 @@ class _HintState extends State { preload(); } - void preload() { - rootBundle.load(Media.animatedHint).then((data) { - setState(() { - _hintFile = RiveFile.import(data); - }); - }); + Future preload() async { + final data = await rootBundle.load(Media.animatedHint); + _hintFile = await File.decode( + data.buffer.asUint8List(), + riveFactory: Factory.rive, + ); + _controller = RiveWidgetController(_hintFile!); + _onInit(_controller.artboard); + setState(() {}); } void _onInit(Artboard artboard) { - final stateController = StateMachineController.fromArtboard( - artboard, - 'bulb', - ); - final themeController = StateMachineController.fromArtboard( - artboard, - 'theme', - ); - artboard - ..addController(stateController!) - ..addController(themeController!); - _luminance = stateController.findInput('pressed')! as SMIBool; - _theme = themeController.findInput('isDark')! as SMIBool; + _stateController = artboard.stateMachine('bulb'); + _themeController = artboard.stateMachine('theme'); + _luminance = _stateController?.boolean('pressed'); + _theme = _themeController?.boolean('isDark'); flipBulbByBooster(context.read().state); - _theme?.change(context.read().state is ThemeStateDark); + _theme?.value = context.read().state is ThemeStateDark; } void flipBulbByBooster(UserStatsState statsState) { @@ -62,12 +59,22 @@ class _HintState extends State { (booster) => booster is UseAHint && booster.boosterCount > 0, ); if (userHasHint) { - _luminance?.change(true); + _luminance?.value = true; } else { - _luminance?.change(false); + _luminance?.value = false; } } + @override + void dispose() { + _controller.dispose(); + _stateController?.dispose(); + _themeController?.dispose(); + _luminance?.dispose(); + _theme?.dispose(); + super.dispose(); + } + @override Widget build(BuildContext context) { if (_hintFile == null) return const SizedBox.shrink(); @@ -75,7 +82,7 @@ class _HintState extends State { message: 'Use a hint', child: BlocConsumer( listener: (context, themeState) { - _theme?.change(themeState is ThemeStateDark); + _theme?.value = themeState is ThemeStateDark; }, builder: (context, themeState) { return BlocConsumer( @@ -123,11 +130,10 @@ class _HintState extends State { baseline: 45, child: SizedBox( width: 50, - child: RiveAnimation.direct( + child: RiveWidget( key: UniqueKey(), - _hintFile!, - fit: BoxFit.cover, - onInit: _onInit, + controller: _controller, + fit: Fit.cover, ), ), ), diff --git a/lib/src/level_won/view/level_complete_page.dart b/lib/src/level_won/view/level_complete_page.dart index e852d09..731a37b 100644 --- a/lib/src/level_won/view/level_complete_page.dart +++ b/lib/src/level_won/view/level_complete_page.dart @@ -3,16 +3,46 @@ import 'package:go_router/go_router.dart'; import 'package:level_data/level_data.dart'; import 'package:rive/rive.dart'; import 'package:sozzle/core/common/widgets/sozzle_app_bar.dart'; +import 'package:sozzle/core/res/media.dart'; import 'package:sozzle/src/game_play/view/game_play_page.dart'; import 'package:sozzle/src/home/view/home_page.dart'; import 'package:sozzle/src/level_won/level_won.dart'; -class LevelCompletePage extends StatelessWidget { +class LevelCompletePage extends StatefulWidget { const LevelCompletePage({required this.levelData, super.key}); static const path = '/won'; final LevelData levelData; + @override + State createState() => _LevelCompletePageState(); +} + +class _LevelCompletePageState extends State { + late File file; + late RiveWidgetController controller; + + bool isInitialized = false; + + @override + void initState() { + super.initState(); + initRive(); + } + + Future initRive() async { + file = (await File.asset(Media.lake, riveFactory: Factory.rive))!; + controller = RiveWidgetController(file); + setState(() => isInitialized = true); + } + + @override + void dispose() { + file.dispose(); + controller.dispose(); + super.dispose(); + } + @override Widget build(BuildContext context) { return Scaffold( @@ -30,10 +60,10 @@ class LevelCompletePage extends StatelessWidget { builder: (scaffoldContext) { return Stack( children: [ - const RiveAnimation.asset( - 'assets/rive/small_lake_on_a_rainy_day.riv', - fit: BoxFit.cover, - ), + if (!isInitialized) + const Center(child: CircularProgressIndicator()) + else + RiveWidget(controller: controller, fit: Fit.cover), Center( child: SafeArea( child: Column( @@ -63,7 +93,7 @@ class LevelCompletePage extends StatelessWidget { child: NextLevelButton( onPressed: () { context.go( - '${GamePlayPage.path}/${levelData.levelId + 1}', + '${GamePlayPage.path}/${widget.levelData.levelId + 1}', ); }, ), diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index b2e5bb8..a7b1429 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -7,13 +7,13 @@ #include "generated_plugin_registrant.h" #include -#include +#include void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) audioplayers_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "AudioplayersLinuxPlugin"); audioplayers_linux_plugin_register_with_registrar(audioplayers_linux_registrar); - g_autoptr(FlPluginRegistrar) rive_common_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "RivePlugin"); - rive_plugin_register_with_registrar(rive_common_registrar); + g_autoptr(FlPluginRegistrar) rive_native_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "RiveNativePlugin"); + rive_native_plugin_register_with_registrar(rive_native_registrar); } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 66f822d..913291c 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -4,7 +4,7 @@ list(APPEND FLUTTER_PLUGIN_LIST audioplayers_linux - rive_common + rive_native ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index a90e4b9..ee46efa 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -7,12 +7,12 @@ import Foundation import audioplayers_darwin import path_provider_foundation -import rive_common +import rive_native import shared_preferences_foundation func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) - RivePlugin.register(with: registry.registrar(forPlugin: "RivePlugin")) + RiveNativePlugin.register(with: registry.registrar(forPlugin: "RiveNativePlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) } diff --git a/pubspec.yaml b/pubspec.yaml index b5fca86..2158b17 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -31,10 +31,10 @@ dependencies: path: packages/level_data localstore: ^1.4.0 path_provider: ^2.1.3 - rive: ^0.13.5 uuid: ^4.4.0 # TODO(RIVE): Reinstall flutter on linux and uncomment level_complete_page.dart # rive: ^0.12.3 + rive: ^0.14.0-dev.11 dev_dependencies: bloc_test: ^9.1.7 diff --git a/test/helpers/pump_app.dart b/test/helpers/pump_app.dart index 379ca4f..0ba4197 100644 --- a/test/helpers/pump_app.dart +++ b/test/helpers/pump_app.dart @@ -8,7 +8,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:sozzle/l10n/l10n.dart'; +import 'package:sozzle/l10n/arb/app_localizations.dart'; extension PumpApp on WidgetTester { Future pumpApp(Widget widget) { diff --git a/test/src/settings/view/settings_page_test.dart b/test/src/settings/view/settings_page_test.dart index b382fbf..b2d9564 100644 --- a/test/src/settings/view/settings_page_test.dart +++ b/test/src/settings/view/settings_page_test.dart @@ -3,7 +3,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mocktail/mocktail.dart'; -import 'package:sozzle/l10n/l10n.dart'; +import 'package:sozzle/l10n/arb/app_localizations.dart'; import 'package:sozzle/src/settings/application/setting_repository.dart'; import 'package:sozzle/src/settings/cubit/setting_cubit.dart'; import 'package:sozzle/src/settings/domain/i_setting_repository.dart'; diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 1374e7b..af57c00 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -7,11 +7,11 @@ #include "generated_plugin_registrant.h" #include -#include +#include void RegisterPlugins(flutter::PluginRegistry* registry) { AudioplayersWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("AudioplayersWindowsPlugin")); - RivePluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("RivePlugin")); + RiveNativePluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("RiveNativePlugin")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 92a4a8a..6c857a6 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -4,7 +4,7 @@ list(APPEND FLUTTER_PLUGIN_LIST audioplayers_windows - rive_common + rive_native ) list(APPEND FLUTTER_FFI_PLUGIN_LIST