123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import 'package:flutter/material.dart';
- import 'package:riverpod_annotation/riverpod_annotation.dart';
- import 'package:shared/utils/color_utils.dart';
- import 'newsfeed_state.dart';
- part 'newsfeed_vm.g.dart';
- @riverpod
- class NewsfeedVm extends _$NewsfeedVm {
- NewsfeedState initState() {
- return NewsfeedState(
- activeIndex: 0,
- tabsList: [
- {
- 'title': 'News',
- 'icon': null,
- 'activeTitleColor': Colors.white,
- 'activeTitleFontSize': 16,
- 'activeTitleBackgroundColor': ColorUtils.string2Color("#4161D0"),
- },
- {
- 'title': 'Following',
- 'icon': null,
- 'activeTitleColor': Colors.white,
- 'activeTitleFontSize': 16,
- 'activeTitleBackgroundColor': ColorUtils.string2Color("#4161D0"),
- },
- {
- 'title': 'For You',
- 'icon': null,
- 'activeTitleColor': Colors.white,
- 'activeTitleFontSize': 16,
- 'activeTitleBackgroundColor': ColorUtils.string2Color("#4161D0"),
- }
- ]
- );
- }
- @override
- NewsfeedState build(){
- NewsfeedState state = initState();
- return state;
- }
- }
|