123456789101112131415 |
- import 'package:flutter/material.dart';
- import 'package:provider/provider.dart';
- import 'package:sport/provider/user_model.dart';
- mixin UserId<T extends StatefulWidget> on State<T> {
- late String selfId;
- late int intUserId;
- @override
- void initState() {
- super.initState();
- intUserId = Provider.of<UserModel>(context, listen: false).user.id;
- selfId = "$intUserId";
- }
- }
|