Skip to main content

growerp_outreach 1.9.0 copy "growerp_outreach: ^1.9.0" to clipboard
growerp_outreach: ^1.9.0 copied to clipboard

GrowERP outreach building block - multi-platform campaign management for email, LinkedIn and X with message tracking and automation.

example/lib/main.dart

/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// ignore_for_file: depend_on_referenced_packages
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:global_configuration/global_configuration.dart';
import 'package:growerp_core/growerp_core.dart';
import 'package:growerp_models/growerp_models.dart';
import 'package:growerp_outreach/growerp_outreach.dart';
import 'package:growerp_user_company/growerp_user_company.dart';
import 'package:growerp_marketing/growerp_marketing.dart';
import 'package:growerp_website/growerp_website.dart';
import 'router_builder.dart';

Future main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await GlobalConfiguration().loadFromAsset('app_settings');

  Bloc.observer = AppBlocObserver();
  RestClient restClient = RestClient(await buildDioClient());
  WsClient chatClient = WsClient('chat');
  WsClient notificationClient = WsClient('notws');

  runApp(
    TopApp(
      restClient: restClient,
      applicationId: 'AppAdmin',
      chatClient: chatClient,
      notificationClient: notificationClient,
      title: 'GrowERP Outreach Example',
      router: createOutreachExampleRouter(),
      widgetRegistrations: [
        getOutreachWidgets(),
        getUserCompanyWidgets(),
        getMarketingWidgets(),
        getWebsiteWidgets(),
      ],
      extraDelegates: const [
        UserCompanyLocalizations.delegate,
        OutreachLocalizations.delegate,
        MarketingLocalizations.delegate,
        WebsiteLocalizations.delegate,
      ],
      extraBlocProviders: [
        BlocProvider<OutreachCampaignBloc>(
          create: (context) => OutreachCampaignBloc(restClient),
        ),
        BlocProvider<OutreachMessageBloc>(
          create: (context) => OutreachMessageBloc(restClient),
        ),
        BlocProvider<PlatformConfigBloc>(
          create: (context) => PlatformConfigBloc(restClient),
        ),
        ...getUserCompanyBlocProviders(restClient, 'AppAdmin'),
        ...getMarketingBlocProviders(restClient, 'AppAdmin'),
        ...getWebsiteBlocProviders(restClient, 'AppAdmin'),
      ],
    ),
  );
}
0
likes
150
points
184
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

GrowERP outreach building block - multi-platform campaign management for email, LinkedIn and X with message tracking and automation.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

Apache-2.0 (license)

Dependencies

bloc, bloc_concurrency, dio, equatable, fast_csv, file_picker, flutter, flutter_bloc, flutter_localizations, flutter_test, growerp_activity, growerp_core, growerp_models, intl, logging, mcp_dart, responsive_framework, stream_transform, universal_io

More

Packages that depend on growerp_outreach