friend_trend_binding.dart 540 Bytes
import 'package:get/get.dart';

import '../controllers/friend_trend_controller.dart';

class FriendTrendBinding extends Bindings {
  @override
  void dependencies() {
    final arguments = Get.arguments;
    if (arguments is! FriendTrendArguments) {
      throw ArgumentError('FriendTrendView requires FriendTrendArguments');
    }

    Get.lazyPut<FriendTrendController>(
      () => FriendTrendController(
        userId: arguments.userId,
        friendName: arguments.name,
        avatarUrl: arguments.avatarUrl,
      ),
    );
  }
}